Skip to content

Commit 28ae063

Browse files
authored
Merge pull request #42 from 56kyle/develop
Add Issue Templates and Update Docs
2 parents 2f163be + 6ff37bc commit 28ae063

File tree

10 files changed

+268
-68
lines changed

10 files changed

+268
-68
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: '🐛 Bug Report'
2+
description: Report a bug with the template or generated projects
3+
labels: [bug]
4+
title: '[Bug] '
5+
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for taking the time to report a bug! Please provide as much detail as possible.
11+
12+
- type: dropdown
13+
id: issue_scope
14+
attributes:
15+
label: Is this a template issue or generated project issue?
16+
options:
17+
- Template/Cookiecutter
18+
- Generated Project
19+
validations:
20+
required: true
21+
22+
- type: textarea
23+
id: description
24+
attributes:
25+
label: Bug Description
26+
description: A clear and concise description of the bug
27+
placeholder: |
28+
What went wrong? Please be as specific as possible.
29+
validations:
30+
required: true
31+
32+
- type: textarea
33+
id: reproduction
34+
attributes:
35+
label: Steps to Reproduce
36+
description: How can we reproduce this issue?
37+
placeholder: |
38+
Either a minimum reproducible example or detailed steps.
39+
validations:
40+
required: true
41+
42+
- type: textarea
43+
id: environment
44+
attributes:
45+
label: Environment
46+
description: Please provide relevant environment details
47+
value: |
48+
- OS:
49+
- Python version:
50+
- Cookiecutter version (if template issue):
51+
- Project configuration (rust extension enabled?):
52+
validations:
53+
required: true
54+
55+
- type: textarea
56+
id: additional
57+
attributes:
58+
label: Additional Context
59+
description: Any other information that might be helpful
60+
validations:
61+
required: false
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: '✨ Feature Request'
2+
description: Suggest new features or improvements
3+
labels: [enhancement]
4+
title: '[Feature] '
5+
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for suggesting a feature! Please help us understand your idea.
11+
12+
- type: dropdown
13+
id: feature_scope
14+
attributes:
15+
label: Is this for the template or generated projects?
16+
options:
17+
- Template (new options, generation features)
18+
- Generated Project (tooling, structure)
19+
- Both
20+
validations:
21+
required: true
22+
23+
- type: textarea
24+
id: summary
25+
attributes:
26+
label: Feature Summary
27+
description: What feature would you like to see?
28+
placeholder: |
29+
A brief description of the feature you're requesting...
30+
validations:
31+
required: true
32+
33+
- type: textarea
34+
id: example
35+
attributes:
36+
label: Example
37+
description: How would this look to the end user?
38+
placeholder: |
39+
Show an example of how this would work or what the user would see/do...
40+
validations:
41+
required: true
42+
43+
- type: textarea
44+
id: additional
45+
attributes:
46+
label: Additional Context
47+
description: Any other relevant information about this feature request
48+
validations:
49+
required: false
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: '📖 Documentation Issue'
2+
description: Report documentation issues or suggest improvements
3+
labels: [documentation]
4+
title: '[Docs] '
5+
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Help us improve our documentation!
11+
12+
- type: dropdown
13+
id: doc_type
14+
attributes:
15+
label: What type of documentation issue is this?
16+
options:
17+
- Missing documentation
18+
- Incorrect/outdated information
19+
- Unclear explanation
20+
- Broken links
21+
- Other improvement
22+
validations:
23+
required: true
24+
25+
- type: textarea
26+
id: description
27+
attributes:
28+
label: Description
29+
description: Describe the documentation issue
30+
placeholder: |
31+
What's wrong with the documentation? What needs to be improved?
32+
validations:
33+
required: true
34+
35+
- type: input
36+
id: link
37+
attributes:
38+
label: Documentation Link
39+
description: Link to the problematic documentation (if applicable)
40+
placeholder: https://...
41+
validations:
42+
required: false
43+
44+
- type: textarea
45+
id: suggestion
46+
attributes:
47+
label: Suggested Improvement
48+
description: How would you improve this documentation?
49+
placeholder: |
50+
What changes would make this clearer or more helpful?
51+
validations:
52+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: ❓ Questions & Support
4+
url: https://github.com/56kyle/cookiecutter-robust-python/discussions
5+
about: Ask questions and get help using cookiecutter-robust-python
6+
- name: 💬 General Discussion
7+
url: https://github.com/56kyle/cookiecutter-robust-python/discussions
8+
about: Discuss ideas, best practices, and share your projects

README.md

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# cookiecutter-robust-python
1+
# Cookiecutter Robust Python
22

33
A Python project template robust enough to follow up [cookiecutter-hypermodern-python]
44

@@ -8,47 +8,54 @@ A Python project template robust enough to follow up [cookiecutter-hypermodern-p
88

99
---
1010

11-
## Usage/Installation
11+
## Quick Start
1212

13-
The only prerequisite for using the template is to [install uv].
13+
### Prerequisites
14+
The only requirement is [uv].
1415

15-
From there just cd into the directory you want to create the project in and run:
16-
```terminaloutput
16+
### Create Your Project
17+
Navigate to where you want to create your project and run:
18+
19+
```bash
1720
uvx cruft create https://github.com/56kyle/cookiecutter-robust-python.git
1821
```
19-
Which will prompt you for a few inputs before generating the project.
20-
```terminaloutput
21-
> [1/15] project_name (robust-python): my-repo-name
22-
> ...
22+
23+
This will prompt you for a few inputs to customize your project:
24+
```
25+
[1/15] project_name (robust-python): my-awesome-project
26+
[2/15] package_name (my_awesome_project):
27+
[3/15] friendly_name (My Awesome Project):
28+
...
2329
```
2430

25-
#### Local Setup
31+
### Project Setup
32+
33+
After generating your project, set it up for development:
2634

27-
Once you have generated your project, and preferably before opening the IDE, the normal workflow to setup everything would go as follows:
28-
```terminaloutput
29-
cd my-repo-name
35+
```bash
36+
cd my-awesome-project
3037

31-
# Pins the uv python version, generates/syncs a venv, etc.
38+
# Set up virtual environment and install dependencies
3239
uvx nox -s setup-venv
3340

34-
# Sets up a git repo w/ a main/develop branch along with an initial commit of everything just generated.
41+
# Initialize git repository with main/develop branches
3542
uvx nox -s setup-git
3643

37-
# Sets up the remote reference and ensures main/develop are pushed/synced. Requires that the remote exists (should be empty).
38-
uvx nos -s setup-remote
44+
# Set up remote repository (requires empty remote repo to exist)
45+
uvx nox -s setup-remote
3946
```
4047

41-
You can also run `uvx nox -t env` for the same effect.
48+
**Quick setup:** Run `uvx nox -t env` to execute all environment setup tasks at once.
4249

4350

4451
## Most Notable Features
4552
- Modern tooling with [uv], [ruff], [cruft], etc.
4653
- Built for supporting most OS's (windows, linux, macos) and all currently supported [python] versions
4754
- Platform agnostic CI/CD ([github], [gitlab], [bitbucket])
4855
- 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
5057
- 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
5259

5360
For a general overview of where we are at with this template, please see the [roadmap](#roadmap) section.
5461

@@ -127,7 +134,7 @@ to Python's ecosystem overall.
127134
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
128135
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.
129136

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,
131138
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.
132139

133140
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
171178
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
172179
of trusted individuals to ensure the project is taken care of.
173180

181+
[bitbucket]: https://bitbucket.org
174182
[bitbucket-pipelines]: https://support.atlassian.com/bitbucket-cloud/docs/write-a-pipe-for-bitbucket-pipelines/
175183
[cookiecutter]: https://cookiecutter.readthedocs.io/en/stable/
176184
[cookiecutter-hypermodern-python]: https://github.com/cjolowicz/cookiecutter-hypermodern-python
177185
[cookiecutter-robust-python]: https://github.com/56kyle/cookiecutter-robust-python
178186
[cruft]: https://cruft.github.io/cruft/
187+
[github]: https://github.com
179188
[github-actions]: https://docs.github.com/en/actions
189+
[gitlab]: https://gitlab.com
180190
[hypermodern python cookiecutter]: https://github.com/cjolowicz/cookiecutter-hypermodern-python
181191
[just]: https://github.com/casey/just?tab=readme-ov-fil
182192
[maturin]: https://github.com/PyO3/maturin
193+
[monorepos]: https://en.wikipedia.org/wiki/Monorepo
194+
[my personal fork]: https://github.com/56kyle/cookiecutter-hypermodern-python
195+
[nox]: https://nox.thea.codes/
183196
[noxfile]: https://github.com/56kyle/cookiecutter-robust-python/blob/main/%7B%7Bcookiecutter.project_name%7D%7D/noxfile.py
184197
[poetry]: https://python-poetry.org/docs/
185198
[polars]: https://github.com/pola-rs/polars
199+
[python]: https://www.python.org/
186200
[robust python cookiecutter]: https://github.com/56kyle/cookiecutter-robust-python
187201
[ruff]: https://docs.astral.sh/ruff/
188202
[rust]: https://www.rust-lang.org/learn

docs/getting-started-template-contributing.md

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,29 @@ To contribute to the template, you will need:
1010
2. **Python 3.9+**: We recommend using a supported Python version.
1111
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<>`.
1212
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.
1714

1815
## Setting up Your Development Environment
1916

2017
1. **Clone the Template Repository:**
2118

2219
```bash
23-
git clone https://github.com/56kyle/cookiecutter-robust-python.git # **UPDATE WITH TEMPLATE REPO URL**
20+
git clone https://github.com/56kyle/cookiecutter-robust-python.git
2421
cd cookiecutter-robust-python
2522
```
2623

2724
2. **Install Template Development Dependencies:**
28-
The template needs dependencies to run its tests, build its documentation, and check its own code.
25+
Install all dependency groups needed for template development:
2926

3027
```bash
31-
uv sync # This installs deps from the template's pyproject.toml into a .venv
28+
uv sync --all-groups
3229
```
3330

3431
3. **Install Pre-commit Hooks for the Template:**
35-
To ensure your contributions meet the template's own code quality standards, install the pre-commit hooks for _this template repository_:
32+
Set up pre-commit hooks to maintain code quality:
3633

3734
```bash
38-
uvx nox -s pre-commit -- install # Installs hooks based on the template's .pre-commit-config.yaml
35+
uvx nox -s pre-commit -- install
3936
```
4037

4138
4. **Set up Dev Container (Optional):**
@@ -52,10 +49,10 @@ The template's own `noxfile.py` defines tasks for maintaining the template itsel
5249
```
5350
5451
2. **Run Core Template Checks:**
55-
This includes linting the template's own Python files (like `noxfile.py`), checking formatting, etc.
52+
Lint and format the template's own Python files:
5653

5754
```bash
58-
uvx nox -s check # Runs the template's internal checks
55+
uvx nox -s lint
5956
```
6057

6158
3. **Build Template Documentation:**
@@ -66,26 +63,27 @@ The template's own `noxfile.py` defines tasks for maintaining the template itsel
6663
```
6764

6865
4. **Run Template Tests:**
69-
(Assuming the template itself has tests, e.g., testing cookiecutter rendering or noxfile sessions).
66+
Test the template's generation functionality:
7067
7168
```bash
72-
uvx nox -s test # Runs tests for the template itself
69+
uvx nox -s test
7370
```
7471
75-
5. **Run All Checks and Tests:**
72+
5. **Generate Demo Project:**
73+
Create a demo project to test template functionality:
74+
7675
```bash
77-
uvx nox # Runs the default sessions defined in noxfile.py (often check and test)
76+
uvx nox -s generate-demo
7877
```
7978
8079
## Updating Template Version and Releasing
8180
8281
This template uses Calendar Versioning (YYYY.MM.DD) for its own releases.
8382
8483
1. **Ensure Your Branch is Up-to-date:** Pull the latest changes from the main branch.
85-
2. **Run Commitizen Bump for the Template:** (Assuming Commitizen is used for template versioning). Use `uvx` to run Commitizen against the template:
84+
2. **Release the Template:**
8685
```bash
87-
uvx cz bump --changelog # Follow prompts, generates tag/changelog entry
88-
# Alternatively, specify increment e.g., uvx cz bump --changelog --increment major_version_zero
86+
uvx nox -s release-template # Uses Commitizen to bump version and create tags
8987
```
9088
This will update the version string(s) (e.g., in `__version__.py` or `conf.py`), create a Git tag, and potentially update the changelog.
9189
3. **Push Changes and Tags:** Push the commits and the newly created tag to the template repository:

docs/our-chosen-toolchain.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ The true power of this template lies in how these chosen tools work together coh
117117
1. **Configuration:** Defined primarily in `pyproject.toml` and separate tool config files ([01](topics/01_project-structure.md)).
118118
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)).
119119
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)).
121121
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)).
122122
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)).
123123
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)).

0 commit comments

Comments
 (0)