test-python-package-release 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. test_python_package_release-0.2.0/.github/.release-please-manifest.json +3 -0
  2. test_python_package_release-0.2.0/.github/dependabot.yml +17 -0
  3. test_python_package_release-0.2.0/.github/release-please-config.json +10 -0
  4. test_python_package_release-0.2.0/.github/workflows/ci.yml +46 -0
  5. test_python_package_release-0.2.0/.github/workflows/claude-review.yml +22 -0
  6. test_python_package_release-0.2.0/.github/workflows/publish.yml +50 -0
  7. test_python_package_release-0.2.0/.github/workflows/release-please.yml +19 -0
  8. test_python_package_release-0.2.0/.gitignore +23 -0
  9. test_python_package_release-0.2.0/.pre-commit-config.yaml +13 -0
  10. test_python_package_release-0.2.0/.python-version +1 -0
  11. test_python_package_release-0.2.0/CHANGELOG.md +25 -0
  12. test_python_package_release-0.2.0/LICENSE +21 -0
  13. test_python_package_release-0.2.0/PKG-INFO +124 -0
  14. test_python_package_release-0.2.0/README.md +90 -0
  15. test_python_package_release-0.2.0/commitlint.config.js +1 -0
  16. test_python_package_release-0.2.0/docs/superpowers/plans/2026-05-30-python-package-release-template.md +945 -0
  17. test_python_package_release-0.2.0/docs/superpowers/specs/2026-05-30-python-package-release-template-design.md +238 -0
  18. test_python_package_release-0.2.0/pyproject.toml +62 -0
  19. test_python_package_release-0.2.0/src/test_python_package_release/__init__.py +15 -0
  20. test_python_package_release-0.2.0/src/test_python_package_release/calculator.py +16 -0
  21. test_python_package_release-0.2.0/src/test_python_package_release/strings.py +7 -0
  22. test_python_package_release-0.2.0/tests/__init__.py +0 -0
  23. test_python_package_release-0.2.0/tests/test_calculator.py +24 -0
  24. test_python_package_release-0.2.0/tests/test_strings.py +17 -0
  25. test_python_package_release-0.2.0/uv.lock +570 -0
@@ -0,0 +1,17 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ groups:
8
+ actions:
9
+ patterns: ["*"]
10
+
11
+ - package-ecosystem: "uv"
12
+ directory: "/"
13
+ schedule:
14
+ interval: "weekly"
15
+ groups:
16
+ dev-dependencies:
17
+ dependency-type: "development"
@@ -0,0 +1,10 @@
1
+ {
2
+ "packages": {
3
+ ".": {
4
+ "release-type": "python",
5
+ "package-name": "test-python-package-release",
6
+ "changelog-path": "CHANGELOG.md",
7
+ "extra-files": ["src/test_python_package_release/__init__.py"]
8
+ }
9
+ }
10
+ }
@@ -0,0 +1,46 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [main]
6
+ push:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ lint:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - uses: astral-sh/setup-uv@v4
15
+ with:
16
+ enable-cache: true
17
+ - run: uv sync --group dev
18
+ - run: uv run ruff check .
19
+ - run: uv run ruff format --check .
20
+ - run: uv run ty check src
21
+
22
+ test:
23
+ runs-on: ubuntu-latest
24
+ strategy:
25
+ fail-fast: false
26
+ matrix:
27
+ python-version: ["3.11", "3.12", "3.13"]
28
+ steps:
29
+ - uses: actions/checkout@v4
30
+ - uses: astral-sh/setup-uv@v4
31
+ with:
32
+ enable-cache: true
33
+ - run: uv python install ${{ matrix.python-version }}
34
+ - name: Run tox env
35
+ run: |
36
+ env_name="py$(echo ${{ matrix.python-version }} | tr -d .)"
37
+ uv run tox -e "${env_name}"
38
+
39
+ commitlint:
40
+ if: github.event_name == 'pull_request'
41
+ runs-on: ubuntu-latest
42
+ steps:
43
+ - uses: actions/checkout@v4
44
+ with:
45
+ fetch-depth: 0
46
+ - uses: wagoid/commitlint-github-action@v6
@@ -0,0 +1,22 @@
1
+ name: Claude Review
2
+
3
+ on:
4
+ issue_comment:
5
+ types: [created]
6
+ pull_request_review_comment:
7
+ types: [created]
8
+
9
+ jobs:
10
+ claude:
11
+ if: contains(github.event.comment.body, '@claude')
12
+ runs-on: ubuntu-latest
13
+ permissions:
14
+ contents: read
15
+ pull-requests: write
16
+ issues: write
17
+ id-token: write
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - uses: anthropics/claude-code-action@v1
21
+ with:
22
+ anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
@@ -0,0 +1,50 @@
1
+ name: Publish
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ build:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: astral-sh/setup-uv@v4
14
+ - run: uv build
15
+ - uses: actions/upload-artifact@v4
16
+ with:
17
+ name: dist
18
+ path: dist/
19
+
20
+ publish-testpypi:
21
+ needs: build
22
+ runs-on: ubuntu-latest
23
+ environment:
24
+ name: testpypi
25
+ url: https://test.pypi.org/p/test-python-package-release
26
+ permissions:
27
+ id-token: write
28
+ steps:
29
+ - uses: actions/download-artifact@v4
30
+ with:
31
+ name: dist
32
+ path: dist/
33
+ - uses: pypa/gh-action-pypi-publish@release/v1
34
+ with:
35
+ repository-url: https://test.pypi.org/legacy/
36
+
37
+ publish-pypi:
38
+ needs: publish-testpypi
39
+ runs-on: ubuntu-latest
40
+ environment:
41
+ name: pypi
42
+ url: https://pypi.org/p/test-python-package-release
43
+ permissions:
44
+ id-token: write
45
+ steps:
46
+ - uses: actions/download-artifact@v4
47
+ with:
48
+ name: dist
49
+ path: dist/
50
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,19 @@
1
+ name: Release Please
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+
7
+ permissions:
8
+ contents: write
9
+ pull-requests: write
10
+
11
+ jobs:
12
+ release-please:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: googleapis/release-please-action@v4
16
+ with:
17
+ token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
18
+ config-file: .github/release-please-config.json
19
+ manifest-file: .github/.release-please-manifest.json
@@ -0,0 +1,23 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
11
+
12
+ # Build artifacts
13
+ dist/
14
+ build/
15
+ *.egg-info/
16
+
17
+ # Test / lint caches
18
+ .tox/
19
+ .pytest_cache/
20
+ .ruff_cache/
21
+ .ty_cache/
22
+ .coverage
23
+ htmlcov/
@@ -0,0 +1,13 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.8.0
4
+ hooks:
5
+ - id: ruff
6
+ args: [--fix]
7
+ - id: ruff-format
8
+
9
+ - repo: https://github.com/compilerla/conventional-pre-commit
10
+ rev: v3.6.0
11
+ hooks:
12
+ - id: conventional-pre-commit
13
+ stages: [commit-msg]
@@ -0,0 +1 @@
1
+ 3.12
@@ -0,0 +1,25 @@
1
+ # Changelog
2
+
3
+ ## [0.2.0](https://github.com/wozniakos10/test_python_package_release/compare/test-python-package-release-v0.1.0...test-python-package-release-v0.2.0) (2026-05-30)
4
+
5
+
6
+ ### Features
7
+
8
+ * add calculator module with tests ([63c6a99](https://github.com/wozniakos10/test_python_package_release/commit/63c6a99b4183460b70beb23ea2c42f461f276b8a))
9
+ * add strings module with tests ([5ec166f](https://github.com/wozniakos10/test_python_package_release/commit/5ec166f41da1846b756ef067da705f1700c0b6ae))
10
+
11
+
12
+ ### Documentation
13
+
14
+ * add LICENSE, README, commitlint config, CHANGELOG ([06022f1](https://github.com/wozniakos10/test_python_package_release/commit/06022f1762af55a52edca35ac0670719278d6f83))
15
+ * **plan:** add implementation plan for template repo ([44615f0](https://github.com/wozniakos10/test_python_package_release/commit/44615f0474a02f912bf4dc56c1f27f9215add8ca))
16
+ * **spec:** add design for Python package release template ([ad5b15f](https://github.com/wozniakos10/test_python_package_release/commit/ad5b15f7835ae55a1c882f5a112a8b03ff4238b0))
17
+ * **spec:** fix language consistency in decisions log ([0d7f1d5](https://github.com/wozniakos10/test_python_package_release/commit/0d7f1d5034c538303b87934affc85f4c1e6dd4a1))
18
+
19
+ ## Changelog
20
+
21
+ All notable changes to this project will be documented in this file.
22
+
23
+ This project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
24
+ and the changelog is generated automatically by
25
+ [release-please](https://github.com/googleapis/release-please).
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Dawid Wozniak
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,124 @@
1
+ Metadata-Version: 2.4
2
+ Name: test-python-package-release
3
+ Version: 0.2.0
4
+ Summary: Template library demonstrating Python package release CI/CD
5
+ Author-email: Dawid Wozniak <wozniakos10@gmail.com>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2026 Dawid Wozniak
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+ License-File: LICENSE
28
+ Classifier: License :: OSI Approved :: MIT License
29
+ Classifier: Programming Language :: Python :: 3.11
30
+ Classifier: Programming Language :: Python :: 3.12
31
+ Classifier: Programming Language :: Python :: 3.13
32
+ Requires-Python: >=3.11
33
+ Description-Content-Type: text/markdown
34
+
35
+ # test-python-package-release
36
+
37
+ Template repository demonstrating a complete CI/CD pipeline for Python packages
38
+ published to PyPI.
39
+
40
+ ## Quick start
41
+
42
+ ```bash
43
+ uv sync --group dev
44
+ uv run pytest
45
+ ```
46
+
47
+ ## Project layout
48
+
49
+ ```
50
+ .
51
+ ├── .github/workflows/ # CI, Claude review, release-please, publish
52
+ ├── src/ # library code (src/ layout)
53
+ ├── tests/ # pytest tests
54
+ ├── pyproject.toml # single source of truth: build, deps, ruff, pytest, tox
55
+ ├── .pre-commit-config.yaml
56
+ ├── commitlint.config.js
57
+ └── CHANGELOG.md # managed by release-please
58
+ ```
59
+
60
+ ## Development
61
+
62
+ ```bash
63
+ # Install hooks (runs ruff + ty pre-commit, conventional commit-msg)
64
+ uv run pre-commit install --hook-type pre-commit --hook-type commit-msg
65
+
66
+ # Run the full test matrix (3.11, 3.12, 3.13)
67
+ uv run tox
68
+
69
+ # Single env
70
+ uv run tox -e py313 -- -k calculator
71
+
72
+ # Lint / format check / type check
73
+ uv run ruff check .
74
+ uv run ruff format --check .
75
+ uv run ty check src
76
+ ```
77
+
78
+ ## Commits
79
+
80
+ Every commit MUST follow the
81
+ [Conventional Commits](https://www.conventionalcommits.org/) specification.
82
+
83
+ Examples:
84
+ - `feat: add support for negative numbers`
85
+ - `fix(calculator): correct divide by zero error`
86
+ - `chore(deps): bump ruff to 0.9`
87
+ - `feat!: drop Python 3.10 support` (breaking change → major bump)
88
+
89
+ Enforced locally by `conventional-pre-commit` (commit-msg hook) and in CI by
90
+ `commitlint`.
91
+
92
+ ## Release flow
93
+
94
+ ```
95
+ PR opened ──▶ ci.yml (lint, ty, pytest matrix, commitlint)
96
+ │
97
+ └─ optional: comment "@claude" ──▶ claude-review.yml
98
+
99
+ PR merged ──▶ main ──▶ release-please.yml
100
+ │
101
+ └─ creates/updates a "Release PR"
102
+ (bumps version, regenerates CHANGELOG)
103
+
104
+ Release PR merged ──▶ release-please tags + creates GitHub Release
105
+ │
106
+ └─ publish.yml ──▶ uv build
107
+ ──▶ TestPyPI (OIDC)
108
+ ──▶ PyPI (OIDC, gated env)
109
+ ```
110
+
111
+ ## First-time setup after cloning the template
112
+
113
+ 1. Rename `name` in `pyproject.toml`, the package directory under `src/`, and
114
+ imports in `tests/`.
115
+ 2. Configure Trusted Publishers on
116
+ [PyPI](https://docs.pypi.org/trusted-publishers/) and
117
+ [TestPyPI](https://docs.pypi.org/trusted-publishers/) for your repo, pointing
118
+ to the `publish.yml` workflow and the `pypi` / `testpypi` environments.
119
+ 3. Create two GitHub Environments named `testpypi` and `pypi` (optionally add
120
+ required reviewers on `pypi` as a manual prod gate).
121
+ 4. Add an `ANTHROPIC_API_KEY` repository secret (for the Claude review
122
+ workflow).
123
+ 5. Settings → Actions → General → Workflow permissions → "Read and write
124
+ permissions" so release-please can open PRs and push tags.
@@ -0,0 +1,90 @@
1
+ # test-python-package-release
2
+
3
+ Template repository demonstrating a complete CI/CD pipeline for Python packages
4
+ published to PyPI.
5
+
6
+ ## Quick start
7
+
8
+ ```bash
9
+ uv sync --group dev
10
+ uv run pytest
11
+ ```
12
+
13
+ ## Project layout
14
+
15
+ ```
16
+ .
17
+ ├── .github/workflows/ # CI, Claude review, release-please, publish
18
+ ├── src/ # library code (src/ layout)
19
+ ├── tests/ # pytest tests
20
+ ├── pyproject.toml # single source of truth: build, deps, ruff, pytest, tox
21
+ ├── .pre-commit-config.yaml
22
+ ├── commitlint.config.js
23
+ └── CHANGELOG.md # managed by release-please
24
+ ```
25
+
26
+ ## Development
27
+
28
+ ```bash
29
+ # Install hooks (runs ruff + ty pre-commit, conventional commit-msg)
30
+ uv run pre-commit install --hook-type pre-commit --hook-type commit-msg
31
+
32
+ # Run the full test matrix (3.11, 3.12, 3.13)
33
+ uv run tox
34
+
35
+ # Single env
36
+ uv run tox -e py313 -- -k calculator
37
+
38
+ # Lint / format check / type check
39
+ uv run ruff check .
40
+ uv run ruff format --check .
41
+ uv run ty check src
42
+ ```
43
+
44
+ ## Commits
45
+
46
+ Every commit MUST follow the
47
+ [Conventional Commits](https://www.conventionalcommits.org/) specification.
48
+
49
+ Examples:
50
+ - `feat: add support for negative numbers`
51
+ - `fix(calculator): correct divide by zero error`
52
+ - `chore(deps): bump ruff to 0.9`
53
+ - `feat!: drop Python 3.10 support` (breaking change → major bump)
54
+
55
+ Enforced locally by `conventional-pre-commit` (commit-msg hook) and in CI by
56
+ `commitlint`.
57
+
58
+ ## Release flow
59
+
60
+ ```
61
+ PR opened ──▶ ci.yml (lint, ty, pytest matrix, commitlint)
62
+ │
63
+ └─ optional: comment "@claude" ──▶ claude-review.yml
64
+
65
+ PR merged ──▶ main ──▶ release-please.yml
66
+ │
67
+ └─ creates/updates a "Release PR"
68
+ (bumps version, regenerates CHANGELOG)
69
+
70
+ Release PR merged ──▶ release-please tags + creates GitHub Release
71
+ │
72
+ └─ publish.yml ──▶ uv build
73
+ ──▶ TestPyPI (OIDC)
74
+ ──▶ PyPI (OIDC, gated env)
75
+ ```
76
+
77
+ ## First-time setup after cloning the template
78
+
79
+ 1. Rename `name` in `pyproject.toml`, the package directory under `src/`, and
80
+ imports in `tests/`.
81
+ 2. Configure Trusted Publishers on
82
+ [PyPI](https://docs.pypi.org/trusted-publishers/) and
83
+ [TestPyPI](https://docs.pypi.org/trusted-publishers/) for your repo, pointing
84
+ to the `publish.yml` workflow and the `pypi` / `testpypi` environments.
85
+ 3. Create two GitHub Environments named `testpypi` and `pypi` (optionally add
86
+ required reviewers on `pypi` as a manual prod gate).
87
+ 4. Add an `ANTHROPIC_API_KEY` repository secret (for the Claude review
88
+ workflow).
89
+ 5. Settings → Actions → General → Workflow permissions → "Read and write
90
+ permissions" so release-please can open PRs and push tags.
@@ -0,0 +1 @@
1
+ module.exports = { extends: ['@commitlint/config-conventional'] };