You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- CI/CD that parities local [nox] sessions for all [python]
49
-
-[maturin] support that can be at any time during the project's lifecycle
56
+
-[maturin] support that can be added at any time during the project's lifecycle
50
57
- Designed to be a maintainable template over time through the use of automated demos and integration tests
51
-
-... and much more!
58
+
-Rich documentation explaining tooling decisions and rationale
52
59
53
60
For a general overview of where we are at with this template, please see the [roadmap](#roadmap) section.
54
61
@@ -127,7 +134,7 @@ to Python's ecosystem overall.
127
134
That being said, it's generally good practice to avoid the complexity of this dual language system unless you actually need the performance bump for your use case. However knowing ahead of time if performance
128
135
will be an issue is rather tricky, and a much easier route is to just prepare as though you _might_ swap to it some day.
129
136
130
-
The [Robust Python Cookiecutter] includes a `include_rust_extensions` flag that not only toggles [maturin] vs a traditional Python package,
137
+
The [Robust Python Cookiecutter] includes an `add_rust_extension` flag that not only toggles [maturin] vs a traditional Python package,
131
138
but that can be used in combination with [cruft] to swap to [maturin] at any time with just about no risk to CI/CD / etc.
132
139
133
140
Additionally, the [Robust Python Cookiecutter] is designed with both normal and [monorepos] in mind. So whether you need to just add
@@ -171,18 +178,25 @@ However, Open Source work is draining, and is especially so for a project templa
171
178
I can guarantee that if the [Robust Python Cookiecutter] ever sees any number of users, I will immediately transfer it to an organization to enable at least a handful
172
179
of trusted individuals to ensure the project is taken care of.
Copy file name to clipboardExpand all lines: docs/getting-started-template-contributing.md
+16-18Lines changed: 16 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,32 +10,29 @@ To contribute to the template, you will need:
10
10
2.**Python 3.9+**: We recommend using a supported Python version.
11
11
3.**uv**: Our chosen dependency manager (see [Dependency Management (02)](topics/02_dependency-management.md)). Install `uv` globally or in a base environment following the official {uv-install}`uv installation guide<>`.
12
12
4.**Docker or Podman**: Required for testing the containerization aspects of the generated template (see [Container Build (11)](topics/11_container-build.md), [Dev Containers (17)](topics/17_dev-containers.md)).
13
-
5.**Task Automation Tools**: The template itself uses a `noxfile.py` to manage its own development and documentation build workflows. Install `nox`:
14
-
```bash
15
-
uv add nox # Ensure you have uv first
16
-
```
13
+
5.**Task Automation Tools**: The template uses `noxfile.py` for development workflows. We use `uvx` to run nox without installing it globally.
17
14
18
15
## Setting up Your Development Environment
19
16
20
17
1.**Clone the Template Repository:**
21
18
22
19
```bash
23
-
git clone https://github.com/56kyle/cookiecutter-robust-python.git# **UPDATE WITH TEMPLATE REPO URL**
Copy file name to clipboardExpand all lines: docs/philosophy.md
+15-2Lines changed: 15 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,19 @@ These principles form the basis for the evaluation criteria and justifications d
40
40
41
41
## Solved Issues
42
42
43
-
The [Robust Python Cookiecutter] also exists to solve a few key issues that were omnipresent in [cookiecutter-hypermodern-python].
43
+
The Robust Python Cookiecutter addresses several key challenges that existed in the original cookiecutter-hypermodern-python:
44
44
45
-
###
45
+
### Template Update Propagation
46
+
One major issue with traditional cookiecutter workflows is the difficulty of propagating template updates to existing projects. The Robust Python Cookiecutter includes built-in support for Cruft, enabling projects to receive template updates through manageable pull requests rather than manual recreation.
47
+
48
+
### Project Domain Expansion
49
+
While pure Python projects are common, many modern Python packages benefit from optional Rust extensions for performance-critical components. The template includes configurable Rust support via Maturin, allowing projects to start as pure Python and add Rust components when needed without architectural disruption.
50
+
51
+
### Documentation of Decisions
52
+
Rather than just providing tooling, this template documents the reasoning behind each tool choice. This enables maintainers to evaluate whether decisions remain valid as the ecosystem evolves, supporting long-term template maintenance.
53
+
54
+
### CI/CD Vendor Independence
55
+
The template is designed to work across GitHub Actions, GitLab CI, and Bitbucket Pipelines by centralizing logic in Nox sessions rather than platform-specific workflow syntax. This ensures consistency and portability.
56
+
57
+
### Long-term Maintenance Strategy
58
+
The template includes comprehensive testing infrastructure with automated demo projects and integration tests, helping ensure changes don't break the generation process and providing confidence in template evolution.
Copy file name to clipboardExpand all lines: docs/quickstart.md
+17-15Lines changed: 17 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
# Quickstart
2
2
3
-
This guide provides the absolute minimum steps to get up and running with a project generated by `cookiecutter-robust-python`. It's for developers who want to start coding and use the core workflows right away.
3
+
This guide covers the essential steps to get up and running with a project generated by `cookiecutter-robust-python`. Perfect for developers who want to start coding with the core workflows immediately.
4
4
5
-
For detailed explanations of the tools and the philosophy, see the full documentation.
5
+
For detailed tool explanations and project philosophy, see the full documentation.
6
6
7
7
---
8
8
@@ -23,10 +23,10 @@ Navigate to the directory you want to create your new project in.
23
23
cd~/path/to/my/repos
24
24
```
25
25
26
-
Generate your project from the template using the given command:
@@ -39,13 +39,13 @@ Navigate to your new project directory:
39
39
cd your-project-slug
40
40
```
41
41
42
-
Install dependencies and create the virtual environment using `uv sync`:
42
+
Set up the virtual environment and install dependencies:
43
43
44
44
```bash
45
-
uv sync
45
+
uvx nox -s setup-venv
46
46
```
47
47
48
-
This command reads `pyproject.toml`, resolves dependencies from `uv.lock`, installs them into a standard virtual environment (`.venv` by default), and prepares the project.
48
+
This sets up a virtual environment with uv and installs all development dependencies.
49
49
50
50
## 4. Install Pre-commit Hooks
51
51
@@ -59,25 +59,27 @@ Now, `git commit` will automatically run code formatting and basic linting check
59
59
60
60
## 5. Run Checks and Tests
61
61
62
-
Execute the template's core quality checks and tests using `nox` from the project root:
62
+
Run quality checks and tests using the nox sessions:
uvx nox # Runs default tasks (often check and test)
65
+
uvx nox -s lint-python # Run Ruff linting
66
+
uvx nox -s typecheck # Run Pyright type checking
67
+
uvx nox -s security-python # Run Bandit and pip-audit
68
+
uvx nox -s tests-python # Run pytest with coverage
68
69
```
69
70
70
-
These commands use the Task Automation layer defined in `noxfile.py` and ensure checks run correctly in isolated environments using your specified Python version.
71
+
These commands run in isolated environments with the proper Python versions as defined in `noxfile.py`.
71
72
72
73
## 6. Build Documentation
73
74
74
-
If you need to view the project's generated documentation locally:
75
+
Build and serve the project documentation locally:
75
76
76
77
```bash
77
-
uvx nox -s docs
78
+
uvx nox -s docs # Build and serve with live reload
79
+
uvx nox -s build-docs # Build only (static files)
78
80
```
79
81
80
-
This builds the project documentation website into the `docs/_build/html` directory.
82
+
The `docs` session builds and serves documentation with automatic reload on changes.
Copy file name to clipboardExpand all lines: docs/usage.md
+13-10Lines changed: 13 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,14 +57,14 @@ The template provides a suite of tools for maintaining code quality, integrated
57
57
-**Format Code:** Code formatting and import sorting is handled by {ruff}`Ruff<>` ([Topic 03](topics/03_code-formatting.md)) using the configuration in `.ruff.toml`. Your pre-commit hooks automatically fix these on commit. To format manually:
58
58
59
59
```bash
60
-
uvx nox -s lint#Includes a formatting check
61
-
# Or directly via uv run (often requires specific args): uv run ruff format .
60
+
uvx nox -s format-python#Format Python code with Ruff
-**Lint Code:** Linting checks for code style (beyond formatting), errors, potential bugs, and code smells using {ruff}`Ruff<>` and {pydocstyle}`pydocstyle<>` ([Topic 04](topics/04_code-linting.md)). Run checks via Task Automation:
65
65
66
66
```bash
67
-
uvx nox -s lint
67
+
uvx nox -s lint-python
68
68
```
69
69
70
70
-**Type Check Code:** Static type analysis using {pyright}`Pyright<>` ([Topic 05](topics/05_type-checking.md)) based on `pyrightconfig.json`:
@@ -76,12 +76,15 @@ The template provides a suite of tools for maintaining code quality, integrated
76
76
-**Security Checks:** Scan for dependency vulnerabilities with {pip-audit}`pip-audit<>` and code security issues with {bandit-bandit}`Bandit<>` ([Topic 08](topics/08_security-checks.md)):
@@ -91,7 +94,7 @@ The template uses {pytest-pytest-cov}`pytest<>` ([Topic 06](topics/06_testing-co
91
94
-**Write Tests:** Place test files (e.g., `test_*.py` or `*_test.py`) in the `tests/` directory.
92
95
-**Run Tests with Coverage:**
93
96
```bash
94
-
uvx nox -s test
97
+
uvx nox -s tests-python
95
98
```
96
99
This runs tests across applicable Python versions and measures code coverage with {coveragepy-coverage}`coverage.py<>` ([Topic 06](topics/06_testing-coverage.md)) based on `.coveragerc`. Reports are generated (JUnit XML for CI, terminal summary).
97
100
@@ -101,11 +104,11 @@ Create and publish your package following Python standards ([Topic 09](topics/09
101
104
102
105
-**Build Package:** Create standard `sdist` (`.tar.gz`) and `wheel` (`.whl`) files in the `dist/` directory.
103
106
```bash
104
-
uvx nox -s build
107
+
uvx nox -s build-python
105
108
```
106
109
-**Publish Package:** Upload built packages using {uv}`uv<>`'s publish command. Requires credentials set via environment variables (e.g., `UV_TOKEN` or `TWINE_API_KEY`).
107
110
```bash
108
-
uvx nox -s publish
111
+
uvx nox -s publish-python
109
112
```
110
113
111
114
## Containerization
@@ -114,7 +117,7 @@ Define and build Docker container images for your application ([Topic 11](topics
114
117
115
118
-**Build Application Image:** Uses the `Dockerfile` in the project root.
116
119
```bash
117
-
uvx nox -s container
120
+
uvx nox -s build-container
118
121
```
119
122
-**Run with Docker Compose:**
120
123
```bash
@@ -128,7 +131,7 @@ Use {commitizen}`Commitizen<>` ([Topic 12](topics/12_task-automation.md)) via {u
128
131
129
132
-**Bump Version:** Automatically determine the next version (major, minor, patch, etc.) based on commit messages since the last tag, update version strings, and create a Git tag.
0 commit comments