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` so that it automatically installs if needed.
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/our-chosen-toolchain.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -117,7 +117,7 @@ The true power of this template lies in how these chosen tools work together coh
117
117
1.**Configuration:** Defined primarily in `pyproject.toml` and separate tool config files ([01](topics/01_project-structure.md)).
118
118
2.**Dependency/Environment Management:** Handled efficiently by {uv}`uv<>`, creating standard virtual environments and managing packages based on `pyproject.toml` and `uv.lock` ([02](topics/02_dependency-management.md)).
119
119
3.**Task Automation:** Orchestrated by {nox}`Nox<>`, calling commands from other tools via `uv run` (or `uvx`), providing the single interface for developers and CI/CD to run workflows ([12](topics/12_task-automation.md)).
120
-
4.**Code Quality & Testing:** Ensured by {ruff}`Ruff<>` (formatting/linting), {pyright}`Pyright<>` (typing), {pip-audit}`pip-audit<>` (dep security), and {bandit-bandit}`Bandit<>` (code security), along with {pytest-pytest-cov}`pytest<>`/{coveragepy-coverage}`coverage.py<>` for testing. These tools are installed via {uv}`uv<>` and executed via Task Automation ([03](topics/03_code-formatting.md)-[08](topics/08_security-checks.md), orchestrated by [12](topics/12_task-automation.md)).
120
+
4.**Code Quality & Testing:** Ensured by {ruff}`Ruff<>` (formatting/linting), {pyright}`Pyright<>` (typing), {pip-audit}`pip-audit<>` (dep security), and {bandit-bandit}`Bandit<>` (code security), along with {pytest-pytest-cov}`pytest<>`/{coveragepy}`coverage.py<>` for testing. These tools are installed via {uv}`uv<>` and executed via Task Automation ([03](topics/03_code-formatting.md)-[08](topics/08_security-checks.md), orchestrated by [12](topics/12_task-automation.md)).
121
121
5.**Packaging & Distribution:** Artifacts created via {uv}`uv<>` build using selected backends, and published via {uv}`uv<>` publish, orchestrated by Task Automation ([09](topics/09_packaging-build.md)-[10](topics/10_packaging-publish.md)).
122
122
6.**Containerization:** Defined by `Dockerfile`, built by {docker}`Docker<>`/{podman}`Podman<>` (often via `uv` installing deps inside), orchestrated by Task Automation. Local multi-container setups managed by {docker}`Docker Compose<>` ([11](topics/11_container-build.md), [15](topics/15_compose-local.md)).
123
123
7.**Automated Workflows:** Triggered by CI/CD platforms (configured to call Task Automation commands), handling matrices, secrets, and reporting ([13](topics/13_ci-orchestration.md)-[14](topics/14_cd-orchestration.md)).
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.
0 commit comments