test-python-package-release 0.2.0__py3-none-any.whl → 0.3.1__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.
@@ -1,14 +1,15 @@
1
1
  """Test Python package release — template library."""
2
2
 
3
- __version__ = "0.2.0" # managed by release-please
3
+ __version__ = "0.3.1" # managed by release-please
4
4
 
5
- from test_python_package_release.calculator import add, divide, multiply, subtract
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
7
7
 
8
8
  __all__ = [
9
9
  "add",
10
10
  "divide",
11
11
  "multiply",
12
+ "power",
12
13
  "reverse_string",
13
14
  "snake_to_camel",
14
15
  "subtract",
@@ -14,3 +14,7 @@ def divide(a: float, b: float) -> float:
14
14
  if b == 0:
15
15
  raise ZeroDivisionError("Cannot divide by zero")
16
16
  return a / b
17
+
18
+
19
+ def power(base: float, exponent: float) -> float:
20
+ return base**exponent
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: test-python-package-release
3
- Version: 0.2.0
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.js
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 package directory under `src/`, and
114
- imports in `tests/`.
115
- 2. Configure Trusted Publishers on
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, 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.
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.
@@ -0,0 +1,7 @@
1
+ test_python_package_release/__init__.py,sha256=4U72s09vHskgx5tBvs40Lxw3dMUXlnNmaoa-5ep68ag,407
2
+ test_python_package_release/calculator.py,sha256=sYwW1XekGBp1ZCkEqQ4mD9Y1TF1pm6uMW0L8VASVIW8,389
3
+ test_python_package_release/strings.py,sha256=wfMdEde8gKrxVJ-HJMsYbgV8IjahgqIRPy5JjLpN1wY,176
4
+ test_python_package_release-0.3.1.dist-info/METADATA,sha256=4cbbdjaGbR7ZZTDetJGn-Foue0TKbBgjzMPgfC-ALb4,6278
5
+ test_python_package_release-0.3.1.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
6
+ test_python_package_release-0.3.1.dist-info/licenses/LICENSE,sha256=FK3qjfsYq7ZWgF5WWecz0lQFe6PoBbKyNYK2hBs0aN8,1070
7
+ test_python_package_release-0.3.1.dist-info/RECORD,,
@@ -1,7 +0,0 @@
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,,