Skip to content

Commit 06ea28c

Browse files
committed
chore: manually run cruft update
1 parent b0b479c commit 06ea28c

File tree

9 files changed

+210
-49
lines changed

9 files changed

+210
-49
lines changed

.cookiecutter.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"_commit": "4935237cbea7516d432242e7383dd659be526538",
2+
"_commit": "269b42a8d0e92911e296973e6a68b80ee6932207",
33
"_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python",
44
"add_rust_extension": false,
55
"author": "Kyle Oliver",

.cruft.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python",
3-
"commit": "4935237cbea7516d432242e7383dd659be526538",
3+
"commit": "269b42a8d0e92911e296973e6a68b80ee6932207",
44
"checkout": null,
55
"context": {
66
"cookiecutter": {
@@ -18,7 +18,7 @@
1818
"license": "MIT",
1919
"development_status": "Development Status :: 1 - Planning",
2020
"_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python",
21-
"_commit": "4935237cbea7516d432242e7383dd659be526538"
21+
"_commit": "269b42a8d0e92911e296973e6a68b80ee6932207"
2222
}
2323
},
2424
"directory": null

.github/workflows/release-python.yml

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,18 @@ name: Release Python Package
66
on:
77
push:
88
tags:
9-
# Trigger on SemVer tags. Commitizen configured in pyproject.toml (Area 12)
10-
# uses PEP 440 which is SemVer compatible.
119
- "v[0-9]+.[0-9]+.[0-9]+"
1210
- "v[0-9]+.[0-9]+.[0-9]+-*" # Include pre-release tags
1311

14-
# Allow workflow to be run manually from the Actions tab for a specific tag
1512
workflow_dispatch:
1613
inputs:
1714
tag:
18-
description: 'Git tag to build and release (e.g., v1.2.3). Must already exist.'
19-
required: true # User must provide a tag when manually dispatching
15+
description: "Git tag to build and release (e.g., v1.2.3). Must already exist."
16+
required: true
2017

2118
jobs:
22-
# Job 1: Build the package and publish to TestPyPI
2319
build_and_testpypi:
2420
name: Build & Publish to TestPyPI
25-
# Run on a consistent, standard build environment
2621
runs-on: ubuntu-latest
2722

2823
steps:
@@ -40,42 +35,31 @@ jobs:
4035
python-version-file: .python-version
4136

4237
- name: Upload built package artifacts
43-
# Upload packages so the publish job can access them.
4438
uses: actions/upload-artifact@v4
4539
with:
46-
name: distribution-packages # Name the artifact
47-
path: dist/ # Path to the built sdist/wheel files
48-
retention-days: 7 # Keep built artifacts for 7 days
40+
name: distribution-packages
41+
path: dist/
42+
retention-days: 7
4943

5044
- name: Download built package artifacts
5145
uses: actions/download-artifact@v4
5246
with:
53-
name: distribution-packages-{{ github.event.inputs.tag }}
47+
name: distribution-packages-${{ github.event.inputs.tag }}
5448
path: dist/
5549

56-
# --- Publish to TestPyPI Step ---
57-
# This step runs within the same job after build.
5850
- name: Publish to TestPyPI
59-
# Execute the Task Automation publish session for TestPyPI.
60-
# This calls uv publish dist/* with TestPyPI credentials/config (Topic 10).
6151
env:
62-
# TestPyPI credentials stored as secrets in GitHub Settings -> Secrets
63-
TWINE_USERNAME: __token__ # Standard username when using API tokens
64-
TWINE_PASSWORD: ${{ secrets.TESTPYPI_API_TOKEN }} # Use GitHub Encrypted Secret
65-
# Optional: If uv publish requires different config for repository URL, pass TWINE_REPOSITORY or similar
66-
run: uvx nox -s publish-package -- --repository testpypi # Call the publish-package session, passing repository arg
67-
68-
# --- Get Changelog Content for Release Notes ---
69-
# Use a standard action to extract changelog content.
70-
# This action requires a standard CHANGELOG.md format.
52+
TWINE_USERNAME: __token__
53+
TWINE_PASSWORD: ${{ secrets.TESTPYPI_API_TOKEN }}
54+
run: uvx nox -s publish-package -- --repository testpypi
55+
7156
- name: Get Release Notes from Changelog
7257
id: changelog
73-
uses: simple-changelog/action@v3 # Action to parse CHANGELOG.md
58+
uses: simple-changelog/action@v3
7459
with:
75-
path: CHANGELOG.md # Path to your CHANGELOG.md
76-
tag: ${{ github.event_name == 'push' && github.ref_name || github.event.inputs.tag }} # Pass the tag name
60+
path: CHANGELOG.md
61+
tag: ${{ github.event_name == 'push' && github.ref_name || github.event.inputs.tag }}
7762

78-
# Define outputs from this job that other jobs (like create_github_release) can use.
7963
outputs:
8064
changelog_body:
8165
description: "Release notes body extracted from CHANGELOG.md"
@@ -119,7 +103,6 @@ jobs:
119103
# Optional: TWINE_REPOSITORY if publishing to a custom production index
120104
run: uvx nox -s publish-package # Call the publish-package session (defaults to pypi.org)
121105

122-
123106
# Job 3: Create GitHub Release (Runs regardless of PyPI publish success, relies on build job for info/artifacts)
124107
create_github_release:
125108
name: Create GitHub Release
@@ -151,7 +134,6 @@ jobs:
151134
# The body of the release notes - access the output from the 'build_and_testpypi' job
152135
body: ${{ needs.build_and_testpypi.outputs.changelog_body }} # Access changelog body from dependent job output
153136

154-
155137
files: dist/* # Attach built sdist and wheel files as release assets
156138
# Optional: Mark as a draft release for manual review before publishing
157139
# draft: true

.github/workflows/security-python.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ on:
1818
- main
1919
- master
2020
paths:
21-
- 'src/**/*.py'
22-
- 'tests/**/*.py'
23-
- 'noxfile.py'
24-
- 'pyproject.toml'
25-
- '.bandit'
26-
- '.ruff.toml'
27-
- '.github/workflows/security-python.yml'
21+
- "src/**/*.py"
22+
- "tests/**/*.py"
23+
- "noxfile.py"
24+
- "pyproject.toml"
25+
- ".bandit"
26+
- ".ruff.toml"
27+
- ".github/workflows/security-python.yml"
2828

2929
workflow_dispatch:
3030

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ repos:
6060
- id: prettier
6161
name: Prettier
6262

63+
- repo: https://github.com/python-jsonschema/check-jsonschema
64+
rev: 0.33.1
65+
hooks:
66+
- id: check-github-workflows
67+
args: ["--verbose"]
68+
6369
- repo: https://github.com/commitizen-tools/commitizen
6470
rev: v4.8.2
6571
hooks:

CODE_OF_CONDUCT.md

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, caste, color, religion, or sexual
10+
identity and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
- Focusing on what is best not just for us as individuals, but for the overall
26+
community
27+
28+
Examples of unacceptable behavior include:
29+
30+
- The use of sexualized language or imagery, and sexual attention or advances of
31+
any kind
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email address,
35+
without their explicit permission
36+
- Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
[56kyleoliver@gmail.com](mailto:56kyleoliver@gmail.com).
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series of
86+
actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or permanent
93+
ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within the
113+
community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.1, available at
119+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120+
121+
Community Impact Guidelines were inspired by
122+
[Mozilla's code of conduct enforcement ladder][mozilla coc].
123+
124+
For answers to common questions about this code of conduct, see the FAQ at
125+
[https://www.contributor-covenant.org/faq][faq]. Translations are available at
126+
[https://www.contributor-covenant.org/translations][translations].
127+
128+
[homepage]: https://www.contributor-covenant.org
129+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130+
[mozilla coc]: https://github.com/mozilla/diversity
131+
[faq]: https://www.contributor-covenant.org/faq
132+
[translations]: https://www.contributor-covenant.org/translations

CONTRIBUTING.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Contributing to cookiecutter-robust-python
2+
3+
Thank you for considering contributing to the `cookiecutter-robust-python` template! We welcome contributions that help improve the template, keep its tooling current, and enhance its documentation.
4+
5+
By participating in this project, you are expected to uphold our [Code of Conduct](CODE_OF_CONDUCT.md).
6+
7+
## How to Contribute
8+
9+
There are several ways to contribute:
10+
11+
1. **Reporting Bugs:** If you find an issue with the template itself (e.g., it doesn't generate correctly, the generated project's workflow doesn't work on a specific OS, a tool is misconfigured), please open an issue on the [issue tracker](https://github.com/56kyle/cookiecutter-robust-python/issues). Provide clear steps to reproduce the bug.
12+
2. **Suggesting Enhancements:** Have an idea for a new feature, a different tool choice you think is better, or an improvement to the template structure or documentation? Open an issue on the [issue tracker](https://github.com/56kyle/cookiecutter-robust-python/issues) to discuss your suggestion. Clearly articulate the proposed change and the rationale behind it, ideally referencing the template's philosophy and criteria ([Template Philosophy](https://56kyle.github.io/cookiecutter-robust-python/philosophy.html), [Criteria for Tool Selection](https://56kyle.github.io/cookiecutter-robust-python/criteria.html)).
13+
3. **Submitting Code Contributions:** Ready to contribute code (e.g., fix a bug, implement a suggested enhancement, update a tool version)? Please fork the repository and submit a Pull Request.
14+
15+
## Setting Up Your Development Environment
16+
17+
Refer to the **[Getting Started: Contributing to the Template](https://56kyle.github.io/cookiecutter-robust-python/getting-started-template-contributing.html)** section in the template documentation for instructions on cloning the repository, installing template development dependencies (using uv), setting up the template's pre-commit hooks, and running template checks/tests.
18+
19+
## Contribution Workflow
20+
21+
1. **Fork** the repository and **clone** your fork.
22+
2. Create a **new branch** for your contribution based on the main branch. Use a descriptive name (e.g., `fix/ci-workflow-on-windows`, `feat/update-uv-version`).
23+
3. Set up your development environment following the [Getting Started](https://56kyle.github.io/cookiecutter-robust-python/getting-started-template-contributing.html) guide (clone, `uv sync`, `uvx nox -s pre-commit -- install`).
24+
4. Make your **code or documentation changes**.
25+
5. Ensure your changes adhere to the template's **code quality standards** (configured in the template's `.pre-commit-config.yaml`, `.ruff.toml`, etc.). The pre-commit hooks will help with this. Run `uvx nox -s lint`, `uvx nox -s check` in the template repository for more comprehensive checks.
26+
6. Ensure your changes **do not break existing functionality**. Run the template's test suite: `uvx nox -s test`. Ideally, add tests for new functionality or bug fixes.
27+
7. Ensure the **template documentation builds correctly** with your changes: `uvx nox -s docs`.
28+
8. Write clear, concise **commit messages** following the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification where possible, especially for significant changes (fixes, features, chore updates, etc.).
29+
9. **Push** your branch to your fork.
30+
10. **Open a Pull Request** from your branch to the main branch of the main template repository. Provide a clear description of your changes. Link to any relevant issues.
31+
32+
## Updating Tool Evaluations
33+
34+
If your contribution involves updating a major tool version or suggesting a different tool entirely, you **must** update the relevant sections in the template's documentation (`docs/topics/` files) to reflect the changes in configuration, behavior, or re-justify the choice based on the current state of the tools and criteria. This is crucial for keeping the documentation accurate and useful over time.
35+
36+
## Communication
37+
38+
For questions or discussion about contributions, open an issue or a discussion on the [GitHub repository](https://github.com/56kyle/cookiecutter-robust-python).
39+
40+
---

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def tests_python(session: Session) -> None:
132132
def docs_build(session: Session) -> None:
133133
"""Build the project documentation (Sphinx)."""
134134
session.log("Installing documentation dependencies...")
135-
session.install("-e", ".", "--group", "dev")
135+
session.install("-e", ".", "--group", "docs")
136136

137137
session.log(f"Building documentation with py{session.python}.")
138138
docs_build_dir = Path("docs") / "_build" / "html"

pyproject.toml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,21 @@ dev = [
2828
"nox>=2025.5.1",
2929
"pre-commit>=4.2.0",
3030
"pre-commit-hooks>=5.0.0",
31+
"ruff>=0.11.9",
32+
"bandit>=1.8.3",
33+
"pip-audit>=2.9.0",
34+
"pytest>=8.3.5",
35+
"pytest-cov>=6.1.1",
36+
"pyright>=1.1.400",
37+
]
38+
docs = [
3139
"furo>=2024.8.6",
3240
"myst-parser>=3.0.1",
3341
"sphinx>=7.4.7",
3442
"sphinx-autodoc-typehints>=2.3.0",
3543
"sphinx-copybutton>=0.5.2",
3644
"sphinx-tabs>=3.4.7",
3745
"sphinxcontrib-typer>=0.5.1",
38-
"pydocstyle>=6.3.0",
39-
"ruff>=0.11.9",
40-
"bandit>=1.8.3",
41-
"pip-audit>=2.9.0",
42-
"pytest>=8.3.5",
43-
"pytest-cov>=6.1.1",
44-
"pyright>=1.1.400",
4546
]
4647

4748
[project.urls]

0 commit comments

Comments
 (0)