test-python-package-release 0.3.0__tar.gz → 0.3.1__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.
- test_python_package_release-0.3.1/.github/.release-please-manifest.json +3 -0
- test_python_package_release-0.3.1/.github/workflows/release-please.yml +44 -0
- {test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/CHANGELOG.md +13 -0
- {test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/PKG-INFO +47 -13
- {test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/README.md +46 -12
- {test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/pyproject.toml +1 -1
- {test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/src/test_python_package_release/__init__.py +1 -1
- {test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/uv.lock +1 -1
- test_python_package_release-0.3.0/.github/.release-please-manifest.json +0 -3
- test_python_package_release-0.3.0/.github/workflows/release-please.yml +0 -19
- {test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/.github/dependabot.yml +0 -0
- {test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/.github/release-please-config.json +0 -0
- {test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/.github/workflows/ci.yml +0 -0
- {test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/.github/workflows/claude-review.yml +0 -0
- {test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/.github/workflows/publish.yml +0 -0
- {test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/.gitignore +0 -0
- {test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/.pre-commit-config.yaml +0 -0
- {test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/.python-version +0 -0
- {test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/LICENSE +0 -0
- {test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/commitlint.config.cjs +0 -0
- {test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/docs/superpowers/plans/2026-05-30-python-package-release-template.md +0 -0
- {test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/docs/superpowers/specs/2026-05-30-python-package-release-template-design.md +0 -0
- {test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/src/test_python_package_release/calculator.py +0 -0
- {test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/src/test_python_package_release/strings.py +0 -0
- {test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/tests/__init__.py +0 -0
- {test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/tests/test_calculator.py +0 -0
- {test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/tests/test_strings.py +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
outputs:
|
|
15
|
+
pr: ${{ steps.release.outputs.pr }}
|
|
16
|
+
release_created: ${{ steps.release.outputs.release_created }}
|
|
17
|
+
steps:
|
|
18
|
+
- uses: googleapis/release-please-action@v4
|
|
19
|
+
id: release
|
|
20
|
+
with:
|
|
21
|
+
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
|
|
22
|
+
config-file: .github/release-please-config.json
|
|
23
|
+
manifest-file: .github/.release-please-manifest.json
|
|
24
|
+
|
|
25
|
+
sync-lockfile:
|
|
26
|
+
needs: release-please
|
|
27
|
+
if: ${{ needs.release-please.outputs.pr }}
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v4
|
|
31
|
+
with:
|
|
32
|
+
ref: ${{ fromJSON(needs.release-please.outputs.pr).headBranchName }}
|
|
33
|
+
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
|
|
34
|
+
- uses: astral-sh/setup-uv@v4
|
|
35
|
+
- run: uv lock
|
|
36
|
+
- name: Commit and push if lockfile changed
|
|
37
|
+
run: |
|
|
38
|
+
if [[ -n "$(git status --porcelain uv.lock)" ]]; then
|
|
39
|
+
git config user.name "github-actions[bot]"
|
|
40
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
41
|
+
git add uv.lock
|
|
42
|
+
git commit -m "chore: sync uv.lock with bumped version"
|
|
43
|
+
git push
|
|
44
|
+
fi
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.1](https://github.com/wozniakos10/test_python_package_release/compare/test-python-package-release-v0.3.0...test-python-package-release-v0.3.1) (2026-05-30)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **ci:** auto-sync uv.lock + improve setup docs ([a899a19](https://github.com/wozniakos10/test_python_package_release/commit/a899a1968b91039b189885c840c072a5eb7ac7ff))
|
|
9
|
+
* **ci:** auto-sync uv.lock in release PR ([3ad6c92](https://github.com/wozniakos10/test_python_package_release/commit/3ad6c9268eab5ff5a6bbbbb7694cae9cdbf1898b))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Documentation
|
|
13
|
+
|
|
14
|
+
* clarify first-time template setup steps ([9ffe772](https://github.com/wozniakos10/test_python_package_release/commit/9ffe7729e9987a09285ae01caf534bbbefa53bd4))
|
|
15
|
+
|
|
3
16
|
## [0.3.0](https://github.com/wozniakos10/test_python_package_release/compare/test-python-package-release-v0.2.0...test-python-package-release-v0.3.0) (2026-05-30)
|
|
4
17
|
|
|
5
18
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: test-python-package-release
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: Template library demonstrating Python package release CI/CD
|
|
5
5
|
Author-email: Dawid Wozniak <wozniakos10@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -53,7 +53,7 @@ uv run pytest
|
|
|
53
53
|
├── tests/ # pytest tests
|
|
54
54
|
├── pyproject.toml # single source of truth: build, deps, ruff, pytest, tox
|
|
55
55
|
├── .pre-commit-config.yaml
|
|
56
|
-
├── commitlint.config.
|
|
56
|
+
├── commitlint.config.cjs
|
|
57
57
|
└── CHANGELOG.md # managed by release-please
|
|
58
58
|
```
|
|
59
59
|
|
|
@@ -110,15 +110,49 @@ Release PR merged ──▶ release-please tags + creates GitHub Release
|
|
|
110
110
|
|
|
111
111
|
## First-time setup after cloning the template
|
|
112
112
|
|
|
113
|
-
1. Rename `name` in `pyproject.toml`, the
|
|
114
|
-
imports in `tests/`.
|
|
115
|
-
|
|
113
|
+
1. **Rename the package**: update `name` in `pyproject.toml`, the directory
|
|
114
|
+
under `src/`, and imports in `tests/`. Also update the `package-name` and
|
|
115
|
+
`extra-files` paths in `.github/release-please-config.json`.
|
|
116
|
+
|
|
117
|
+
2. **Workflow permissions**: Settings → Actions → General → Workflow
|
|
118
|
+
permissions. Enable:
|
|
119
|
+
- "Read and write permissions"
|
|
120
|
+
- "Allow GitHub Actions to create and approve pull requests"
|
|
121
|
+
|
|
122
|
+
3. **Personal Access Token for release-please**: create a fine-grained PAT
|
|
123
|
+
([generate here](https://github.com/settings/personal-access-tokens/new))
|
|
124
|
+
scoped to this repo with `Contents: read+write`, `Pull requests: read+write`,
|
|
125
|
+
`Workflows: read+write`. Add as repository secret `RELEASE_PLEASE_TOKEN`.
|
|
126
|
+
(Required so the GitHub Release created by release-please triggers the
|
|
127
|
+
`publish.yml` workflow — events from the default `GITHUB_TOKEN` do not
|
|
128
|
+
trigger other workflows.)
|
|
129
|
+
|
|
130
|
+
4. **Install the Claude Code GitHub App** at
|
|
131
|
+
[github.com/apps/claude](https://github.com/apps/claude) and grant access to
|
|
132
|
+
this repo. Add `ANTHROPIC_API_KEY` repository secret.
|
|
133
|
+
|
|
134
|
+
5. **Configure Trusted Publishers** on
|
|
116
135
|
[PyPI](https://docs.pypi.org/trusted-publishers/) and
|
|
117
|
-
[TestPyPI](https://docs.pypi.org/trusted-publishers/) for your repo
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
136
|
+
[TestPyPI](https://docs.pypi.org/trusted-publishers/) for your repo. Use
|
|
137
|
+
"pending publisher" if the project doesn't exist yet. Point each to:
|
|
138
|
+
- Workflow name: `publish.yml`
|
|
139
|
+
- Environment name: `pypi` (production) and `testpypi` respectively
|
|
140
|
+
|
|
141
|
+
6. **Create GitHub Environments** `testpypi` and `pypi` under Settings →
|
|
142
|
+
Environments. For each, under **Deployment branches and tags**:
|
|
143
|
+
- Select "Selected branches and tags"
|
|
144
|
+
- Add a **branch** rule: `main`
|
|
145
|
+
- Add a **tag** rule (toggle ref type to "Tag" in the modal): use the tag
|
|
146
|
+
pattern that release-please produces — by default
|
|
147
|
+
`<package-name>-v*` (e.g. `test-python-package-release-v*`)
|
|
148
|
+
|
|
149
|
+
7. **(Optional) Branch protection ruleset** for `main`:
|
|
150
|
+
- Require a PR before merging
|
|
151
|
+
- Require status checks: `lint`, `test (3.11)`, `test (3.12)`,
|
|
152
|
+
`test (3.13)`, `commitlint`
|
|
153
|
+
- Block force pushes, restrict deletions
|
|
154
|
+
- Add yourself to the bypass list so you can merge release-please PRs
|
|
155
|
+
|
|
156
|
+
8. **(Optional) Production gate** for PyPI publishing — on Pro/Team/Enterprise
|
|
157
|
+
plans only: add a Required reviewer on the `pypi` environment to require
|
|
158
|
+
manual approval before production publish.
|
|
@@ -19,7 +19,7 @@ uv run pytest
|
|
|
19
19
|
├── tests/ # pytest tests
|
|
20
20
|
├── pyproject.toml # single source of truth: build, deps, ruff, pytest, tox
|
|
21
21
|
├── .pre-commit-config.yaml
|
|
22
|
-
├── commitlint.config.
|
|
22
|
+
├── commitlint.config.cjs
|
|
23
23
|
└── CHANGELOG.md # managed by release-please
|
|
24
24
|
```
|
|
25
25
|
|
|
@@ -76,15 +76,49 @@ Release PR merged ──▶ release-please tags + creates GitHub Release
|
|
|
76
76
|
|
|
77
77
|
## First-time setup after cloning the template
|
|
78
78
|
|
|
79
|
-
1. Rename `name` in `pyproject.toml`, the
|
|
80
|
-
imports in `tests/`.
|
|
81
|
-
|
|
79
|
+
1. **Rename the package**: update `name` in `pyproject.toml`, the directory
|
|
80
|
+
under `src/`, and imports in `tests/`. Also update the `package-name` and
|
|
81
|
+
`extra-files` paths in `.github/release-please-config.json`.
|
|
82
|
+
|
|
83
|
+
2. **Workflow permissions**: Settings → Actions → General → Workflow
|
|
84
|
+
permissions. Enable:
|
|
85
|
+
- "Read and write permissions"
|
|
86
|
+
- "Allow GitHub Actions to create and approve pull requests"
|
|
87
|
+
|
|
88
|
+
3. **Personal Access Token for release-please**: create a fine-grained PAT
|
|
89
|
+
([generate here](https://github.com/settings/personal-access-tokens/new))
|
|
90
|
+
scoped to this repo with `Contents: read+write`, `Pull requests: read+write`,
|
|
91
|
+
`Workflows: read+write`. Add as repository secret `RELEASE_PLEASE_TOKEN`.
|
|
92
|
+
(Required so the GitHub Release created by release-please triggers the
|
|
93
|
+
`publish.yml` workflow — events from the default `GITHUB_TOKEN` do not
|
|
94
|
+
trigger other workflows.)
|
|
95
|
+
|
|
96
|
+
4. **Install the Claude Code GitHub App** at
|
|
97
|
+
[github.com/apps/claude](https://github.com/apps/claude) and grant access to
|
|
98
|
+
this repo. Add `ANTHROPIC_API_KEY` repository secret.
|
|
99
|
+
|
|
100
|
+
5. **Configure Trusted Publishers** on
|
|
82
101
|
[PyPI](https://docs.pypi.org/trusted-publishers/) and
|
|
83
|
-
[TestPyPI](https://docs.pypi.org/trusted-publishers/) for your repo
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
102
|
+
[TestPyPI](https://docs.pypi.org/trusted-publishers/) for your repo. Use
|
|
103
|
+
"pending publisher" if the project doesn't exist yet. Point each to:
|
|
104
|
+
- Workflow name: `publish.yml`
|
|
105
|
+
- Environment name: `pypi` (production) and `testpypi` respectively
|
|
106
|
+
|
|
107
|
+
6. **Create GitHub Environments** `testpypi` and `pypi` under Settings →
|
|
108
|
+
Environments. For each, under **Deployment branches and tags**:
|
|
109
|
+
- Select "Selected branches and tags"
|
|
110
|
+
- Add a **branch** rule: `main`
|
|
111
|
+
- Add a **tag** rule (toggle ref type to "Tag" in the modal): use the tag
|
|
112
|
+
pattern that release-please produces — by default
|
|
113
|
+
`<package-name>-v*` (e.g. `test-python-package-release-v*`)
|
|
114
|
+
|
|
115
|
+
7. **(Optional) Branch protection ruleset** for `main`:
|
|
116
|
+
- Require a PR before merging
|
|
117
|
+
- Require status checks: `lint`, `test (3.11)`, `test (3.12)`,
|
|
118
|
+
`test (3.13)`, `commitlint`
|
|
119
|
+
- Block force pushes, restrict deletions
|
|
120
|
+
- Add yourself to the bypass list so you can merge release-please PRs
|
|
121
|
+
|
|
122
|
+
8. **(Optional) Production gate** for PyPI publishing — on Pro/Team/Enterprise
|
|
123
|
+
plans only: add a Required reviewer on the `pypi` environment to require
|
|
124
|
+
manual approval before production publish.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Test Python package release — template library."""
|
|
2
2
|
|
|
3
|
-
__version__ = "0.3.
|
|
3
|
+
__version__ = "0.3.1" # managed by release-please
|
|
4
4
|
|
|
5
5
|
from test_python_package_release.calculator import add, divide, multiply, power, subtract
|
|
6
6
|
from test_python_package_release.strings import reverse_string, snake_to_camel
|
|
@@ -1,19 +0,0 @@
|
|
|
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
|
{test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/.github/dependabot.yml
RENAMED
|
File without changes
|
|
File without changes
|
{test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/.github/workflows/ci.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/.pre-commit-config.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/commitlint.config.cjs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/tests/test_calculator.py
RENAMED
|
File without changes
|
{test_python_package_release-0.3.0 → test_python_package_release-0.3.1}/tests/test_strings.py
RENAMED
|
File without changes
|