test-python-package-release 0.2.0__py3-none-any.whl

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.
@@ -0,0 +1,15 @@
1
+ """Test Python package release — template library."""
2
+
3
+ __version__ = "0.2.0" # managed by release-please
4
+
5
+ from test_python_package_release.calculator import add, divide, multiply, subtract
6
+ from test_python_package_release.strings import reverse_string, snake_to_camel
7
+
8
+ __all__ = [
9
+ "add",
10
+ "divide",
11
+ "multiply",
12
+ "reverse_string",
13
+ "snake_to_camel",
14
+ "subtract",
15
+ ]
@@ -0,0 +1,16 @@
1
+ def add(a: float, b: float) -> float:
2
+ return a + b
3
+
4
+
5
+ def subtract(a: float, b: float) -> float:
6
+ return a - b
7
+
8
+
9
+ def multiply(a: float, b: float) -> float:
10
+ return a * b
11
+
12
+
13
+ def divide(a: float, b: float) -> float:
14
+ if b == 0:
15
+ raise ZeroDivisionError("Cannot divide by zero")
16
+ return a / b
@@ -0,0 +1,7 @@
1
+ def reverse_string(s: str) -> str:
2
+ return s[::-1]
3
+
4
+
5
+ def snake_to_camel(s: str) -> str:
6
+ parts = s.split("_")
7
+ return parts[0] + "".join(p.title() for p in parts[1:])
@@ -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,7 @@
1
+ test_python_package_release/__init__.py,sha256=jahPOvj7s5_mBYIm5k_V08RD-abMkGZH1Gf7suI5Gpc,387
2
+ test_python_package_release/calculator.py,sha256=0ndr-IX6eaaP3mNmTp3HxD3aeUqAeLZ-TmO3xj78y8o,311
3
+ test_python_package_release/strings.py,sha256=wfMdEde8gKrxVJ-HJMsYbgV8IjahgqIRPy5JjLpN1wY,176
4
+ test_python_package_release-0.2.0.dist-info/METADATA,sha256=-glxveboyboG4CTQV8XT2ZXMwk823J912QIYJf91PJw,4623
5
+ test_python_package_release-0.2.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
6
+ test_python_package_release-0.2.0.dist-info/licenses/LICENSE,sha256=FK3qjfsYq7ZWgF5WWecz0lQFe6PoBbKyNYK2hBs0aN8,1070
7
+ test_python_package_release-0.2.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -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.