Skip to content

Commit 834698b

Browse files
committed
Changes in README, CONTRIBUTING.md and docs
1 parent fd19a6b commit 834698b

4 files changed

Lines changed: 235 additions & 215 deletions

File tree

CONTRIBUTING.md

Lines changed: 65 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,127 +1,131 @@
11
# Contributing to Python Project Template
22

3-
Hello and welcome! We're excited that you're interested in contributing to the Python
4-
Project Template project.
3+
Thank you for your interest in contributing to the **Python Project Template**.
4+
Contributions of all types are welcome, including code, documentation, bug reports, and
5+
feature requests. This guide outlines the recommended workflow for contributing
6+
effectively.
57

6-
We appreciate all types of contributions whether it's code, documentation, bug reports,
7-
or feature requests.
8+
## Joining the Project
89

9-
## Want to Join the Team?
10+
If you are interested in contributing or collaborating more closely, feel free to reach
11+
out to the maintainers.
1012

11-
If you’re interested in contributing or collaborating more closely, feel free to reach
12-
out!.
13+
## Ways to Contribute
1314

14-
## How to Contribute Code
15+
You can contribute by:
1516

16-
There are two main ways to contribute:
17+
- Reporting bugs or requesting new features.
18+
- Submitting code contributions, including bug fixes, improvements, or new features.
1719

18-
- Request a **new feature** or report a **bug**
19-
- Submit a **code contribution** (bug fix, feature, improvement, etc.)
20+
> Note: While we strive to respond promptly, we cannot guarantee an immediate reply due
21+
> to the number of projects we maintain.
2022
21-
> Please note: we're actively supporting several projects, so while we’ll do our best to
22-
> respond promptly, we can't always guarantee an immediate reply.
23+
## Contributing Code
2324

2425
### Step 1: Open an Issue
2526

26-
Start by opening an issue to describe your proposal or the problem you've found. This
27-
helps us evaluate and guide the work before coding begins.
27+
Start by opening an issue to describe your proposed change or the problem you
28+
encountered. This helps maintainers review and guide the work before coding begins.
2829

29-
> If your change is small (e.g., a typo fix or minor bug), feel free to skip this and
30-
> open a pull request directly.
30+
> For minor changes, such as typo fixes, you may skip this step and submit a pull
31+
> request directly.
3132
3233
### Step 2: Make Your Changes
3334

34-
1. Fork this repository.
35-
2. Clone it locally.
36-
3. Create a new branch for your change.
35+
1. Fork the repository.
36+
2. Clone your fork locally.
37+
3. Create a new branch for your changes.
3738
4. Set up your development environment (see [Setup Environment](#setup-environment)).
38-
5. Make your changes and ensure all tests pass.
39+
5. Implement your changes and ensure all tests pass.
3940

4041
### Step 3: Submit a Pull Request
4142

42-
Once your changes are ready, open a pull request (PR) from your forked branch to the
43-
`main` branch.
43+
Open a pull request (PR) from your branch to the `main` branch of the repository.
4444

4545
### Step 4: Code Review
4646

47-
A maintainer will review your PR and may leave feedback. You may be asked to revise the
48-
code, improve formatting, or adjust test coverage.
47+
A maintainer will review your PR and may provide feedback. You might be asked to:
4948

50-
> Fix any failing tests and address review comments before re-requesting review.
49+
- Revise code for correctness or clarity
50+
- Adjust formatting
51+
- Improve test coverage
52+
53+
> Address any review comments and ensure all tests pass before requesting a re-review.
5154
5255
### Step 5: Merge
5356

54-
Once approved, a maintainer will merge the pull request.
57+
After approval, a maintainer will merge your pull request.
5558

5659
## Setup Environment
5760

58-
You can set up your dev environment in two ways:
61+
You can set up the development environment in one of two ways:
5962

6063
### Option 1: Dev Container
6164

62-
We support Visual Studio Code, GitHub Codespaces, and JetBrains IDEs dev containers for
63-
an easy, preconfigured development setup.
65+
We support development containers for Visual Studio Code, GitHub Codespaces, and
66+
JetBrains IDEs. This provides a preconfigured environment for immediate work.
6467

6568
### Option 2: Local Setup
6669

67-
To work locally:
70+
To set up locally:
6871

69-
1. Install `git`, `python`, and preferably [`uv`](https://github.com/astral-sh/uv).
70-
2. Clone the repository.
71-
3. Run:
72+
1. Ensure `git` and Python (3.10, 3.11, or 3.12) are installed.
73+
2. Optionally, install [`uv`](https://github.com/astral-sh/uv) to manage dependency
74+
groups.
75+
3. Clone the repository and run:
7276

73-
```bash
74-
make install
75-
```
77+
```bash
78+
make install
79+
```
7680

77-
> The required Python version is defined in `pyproject.toml`. If using `uv`, it will
78-
> create a compatible virtual environment automatically.
81+
> If using `uv`, a compatible virtual environment will be created automatically.
7982
8083
## Running Tests
8184

82-
We use [pytest](https://docs.pytest.org/) for testing. Run all tests with:
85+
All tests are run using [pytest](https://docs.pytest.org/):
8386

8487
```bash
8588
make tests
8689
```
8790

8891
## Code Formatting & Quality Checks
8992

90-
We use `make` to automate formatting, linting, and checks. Just run:
93+
Use `make` to automate formatting, linting, static analysis, testing, and documentation:
9194

9295
```bash
9396
make
9497
```
9598

96-
This will:
99+
This executes:
97100

98-
- Install dependencies
99-
- Run linters (`black`, `isort`, `ruff`, ...)
100-
- Run static analysis (`complexipy`)
101-
- Run tests
102-
- Serve the documentation locally
101+
- Dependency installation
102+
- Linters (`ruff`, `black`, `isort`)
103+
- Static analysis (`complexipy`, `mypy`, `bandit`)
104+
- Test suite execution
105+
- Local documentation preview
103106

104-
## Docstring Style
107+
## Docstring Guidelines
105108

106-
A good function docstring typically includes:
109+
Function docstrings should include:
107110

108-
- A short one-line description
109-
- Optional longer explanation
110-
- `Args:` section with parameter descriptions
111+
- A concise one-line description
112+
- Optional detailed explanation
113+
- `Args:` section describing parameters
111114
- `Returns:` section
112-
- Optional `Raises:` section
113-
- Optional `Examples:` section
115+
- Optional `Raises:` section for exceptions
116+
- Optional `Examples:` section demonstrating usage
114117

115-
Please write clear, concise, and consistent docstrings.
118+
Maintain clarity, consistency, and completeness in docstrings.
116119

117120
## Other Ways to Contribute
118121

119-
Not a fan of writing code? You can still help by:
122+
Non-code contributions are highly valuable, including:
120123

121124
- Improving documentation or examples
122-
- Fixing typos or grammar
123-
- Suggesting features or usability improvements
124-
- Helping triage and respond to issues
125+
- Fixing typos and grammar issues
126+
- Suggesting features or enhancements
127+
- Assisting with issue triage and responses
125128

126-
Thank you for being part of Python Project Template's journey. We’re thrilled to have
127-
you here. If you have questions, feel free to reach out or open an issue.
129+
Thank you for contributing to the Python Project Template. Your participation helps
130+
improve the project for everyone. If you have questions, feel free to reach out or open
131+
an issue.

README.md

Lines changed: 50 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,65 +4,92 @@
44
</p>
55

66
<p align="center">
7-
<a href="https://github.com/danibcorr/python-project-template/actions/workflows/workflow.yml"><img src="https://github.com/danibcorr/python-project-template/actions/workflows/workflow.yml/badge.svg"></a>
7+
<a href="https://github.com/danibcorr/python-project-template/actions/workflows/workflow.yml">
8+
<img src="https://github.com/danibcorr/python-project-template/actions/workflows/workflow.yml/badge.svg">
9+
</a>
810
<img src="https://img.shields.io/badge/python-3.10%20|%203.11%20|%203.12-blue">
911
<a href="https://github.com/danibcorr/python-project-template/blob/main/LICENSE" target="_blank">
10-
<img src="https://img.shields.io/github/license/danibcorr/python-project-template" alt="License">
12+
<img src="https://img.shields.io/github/license/danibcorr/python-project-template" alt="License">
1113
</a>
1214
</p>
1315

1416
# 🐍 Python Project Template
1517

16-
Welcome to the Python Project Template — your go-to starter kit for building robust
17-
Python projects with clean code, strong testing, built-in security, and automated
18-
deployment. Whether you're launching a new idea or refining your workflow, this template
19-
sets you up for success.
18+
Python Project Template provides a ready-to-use structure for Python projects,
19+
integrating best practices for code quality, testing, security, documentation, and
20+
CI/CD. It helps developers start new projects quickly with a maintainable and
21+
professional foundation.
22+
23+
## Features
24+
25+
- **Linting & Type Checking**: Ruff and Mypy for clean, consistent code.
26+
- **Security Scanning**: Bandit detects potential vulnerabilities.
27+
- **Code Complexity Analysis**: Complexipy identifies complex functions and modules.
28+
- **Testing Suite**: Reliable unit testing with Pytest.
29+
- **Auto Documentation**: MkDocs + GitHub Pages for automated docs.
30+
- **CI/CD**: GitHub Actions automates linting, testing, and documentation deployment.
31+
32+
## GitHub Actions
2033

21-
## What's Inside
34+
The template includes a preconfigured GitHub Actions workflow that runs automatically on
35+
pushes or pull requests. The workflow performs the following steps:
2236

23-
- **Linting & Type Checking**: Keep your code clean with
24-
[Ruff](https://docs.astral.sh/ruff/) and [Mypy](http://mypy-lang.org/).
25-
- **Security Scanning**: Catch vulnerabilities early using
26-
[Bandit](https://bandit.readthedocs.io/en/latest/).
27-
- **Code Complexity Analysis**: Understand your codebase with
28-
[Complexipy](https://rohaquinlop.github.io/complexipy/).
29-
- **Testing Suite**: Reliable testing with [Pytest](https://docs.pytest.org/en/stable/).
30-
- **Auto Documentation**: Generate and deploy docs with
31-
[MkDocs](https://www.mkdocs.org/) + [GitHub Pages](https://pages.github.com/).
32-
- **CI/CD**: Automate your workflow using GitHub Actions — from linting and testing to
33-
doc deployment.
37+
1. Checks out the repository and sets up Python.
38+
2. Installs project dependencies.
39+
3. Runs linters, type checks, security scans, and complexity analysis.
40+
4. Executes tests with Pytest.
41+
5. Optionally generates and deploys documentation.
3442

35-
And more.
43+
This ensures every change is validated, tested, and documented automatically,
44+
maintaining high-quality and reproducible results.
3645

3746
## Getting Started
3847

48+
Before starting, ensure that you have required Python installed and a virtual
49+
environment set up. It is recommended to create an isolated environment (e.g., using
50+
`venv`) to manage dependencies cleanly. Additionally, ensure that
51+
[`uv`](https://github.com/astral-sh/uv) is installed in your environment to handle
52+
grouped dependency installations.
53+
3954
### 1. Generate Your Project
4055

41-
Activate your Python environment, install `cookiecutter`, and run:
56+
Use Cookiecutter to create a new project from the template:
4257

4358
```bash
4459
cookiecutter https://github.com/danibcorr/python-project-template.git
4560
```
4661

62+
Follow the prompts to configure project metadata, package name, and other options.
63+
4764
### 2. Install Dependencies
4865

49-
Use the included `Makefile`:
66+
Activate your virtual environment and install all dependencies using the included
67+
`Makefile`:
5068

5169
```bash
5270
make install
5371
```
5472

73+
This installs development, testing, and documentation tools as defined in
74+
`pyproject.toml`.
75+
5576
### 3. Run the Pipeline
5677

57-
Lint, test, and check your project:
78+
Execute the quality pipeline, which includes linting, type checking, security analysis,
79+
complexity checks, and test execution:
5880

5981
```bash
6082
make pipeline
6183
```
6284

63-
Or run the full suite including docs:
85+
### 4. Run the Full Workflow (Optional)
86+
87+
To perform a complete setup including dependency installation, full quality checks, and
88+
local documentation preview:
6489

6590
```bash
6691
make all
6792
```
6893

94+
This ensures that the project environment is fully prepared for development and
95+
validation.

0 commit comments

Comments
 (0)