clankers 0.0.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.
@@ -0,0 +1,65 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+
8
+ concurrency:
9
+ group: ci-${{ github.ref }}
10
+ cancel-in-progress: true
11
+
12
+ jobs:
13
+ lint:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+
18
+ - name: Install uv
19
+ uses: astral-sh/setup-uv@v5
20
+ with:
21
+ enable-cache: true
22
+
23
+ - name: Sync dependencies
24
+ run: uv sync --group dev --python 3.13
25
+
26
+ - name: Ruff lint
27
+ run: uv run ruff check .
28
+
29
+ - name: Ruff format check
30
+ run: uv run ruff format --check .
31
+
32
+ - name: Prettier format check
33
+ run: npx --yes prettier@3.9.6 --check .
34
+
35
+ test:
36
+ runs-on: ubuntu-latest
37
+ steps:
38
+ - uses: actions/checkout@v4
39
+
40
+ - name: Install uv
41
+ uses: astral-sh/setup-uv@v5
42
+ with:
43
+ enable-cache: true
44
+
45
+ - name: Sync dependencies
46
+ run: uv sync --group dev --python 3.13
47
+
48
+ - name: Run tests
49
+ run: uv run --group dev pytest -q
50
+
51
+ build:
52
+ runs-on: ubuntu-latest
53
+ steps:
54
+ - uses: actions/checkout@v4
55
+
56
+ - name: Install uv
57
+ uses: astral-sh/setup-uv@v5
58
+ with:
59
+ enable-cache: true
60
+
61
+ - name: Build wheel and sdist
62
+ run: uv build
63
+
64
+ - name: Check package metadata
65
+ run: uvx twine check dist/*
@@ -0,0 +1,57 @@
1
+ name: Publish
2
+
3
+ # Publishes to PyPI when a GitHub Release is published (see scripts/release.sh).
4
+ # Uses PyPI Trusted Publishing (OIDC) — no API token is stored.
5
+ # One-time setup on PyPI: add a trusted publisher for project "clankers" with
6
+ # owner=radajakub, repository=clankers, workflow=publish.yml, environment=pypi.
7
+ on:
8
+ release:
9
+ types: [published]
10
+
11
+ jobs:
12
+ build:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - name: Install uv
18
+ uses: astral-sh/setup-uv@v5
19
+
20
+ - name: Verify tag matches the package version
21
+ run: |
22
+ version="$(uv version --short)"
23
+ tag="${GITHUB_REF_NAME#v}"
24
+ if [ "$version" != "$tag" ]; then
25
+ echo "tag $GITHUB_REF_NAME does not match pyproject version $version" >&2
26
+ exit 1
27
+ fi
28
+
29
+ - name: Build wheel and sdist
30
+ run: uv build
31
+
32
+ - name: Check package metadata
33
+ run: uvx twine check dist/*
34
+
35
+ - name: Upload build artifacts
36
+ uses: actions/upload-artifact@v4
37
+ with:
38
+ name: dist
39
+ path: dist/
40
+
41
+ publish:
42
+ needs: build
43
+ runs-on: ubuntu-latest
44
+ environment:
45
+ name: pypi
46
+ url: https://pypi.org/p/clankers
47
+ permissions:
48
+ id-token: write # required for trusted publishing
49
+ steps:
50
+ - name: Download build artifacts
51
+ uses: actions/download-artifact@v4
52
+ with:
53
+ name: dist
54
+ path: dist/
55
+
56
+ - name: Publish to PyPI
57
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,218 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ # Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ # poetry.lock
109
+ # poetry.toml
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
+ # pdm.lock
116
+ # pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # pixi
121
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
+ # pixi.lock
123
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
+ # in the .venv directory. It is recommended not to include this directory in version control.
125
+ .pixi
126
+
127
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
+ __pypackages__/
129
+
130
+ # Celery stuff
131
+ celerybeat-schedule
132
+ celerybeat.pid
133
+
134
+ # Redis
135
+ *.rdb
136
+ *.aof
137
+ *.pid
138
+
139
+ # RabbitMQ
140
+ mnesia/
141
+ rabbitmq/
142
+ rabbitmq-data/
143
+
144
+ # ActiveMQ
145
+ activemq-data/
146
+
147
+ # SageMath parsed files
148
+ *.sage.py
149
+
150
+ # Environments
151
+ .env
152
+ .envrc
153
+ .venv
154
+ env/
155
+ venv/
156
+ ENV/
157
+ env.bak/
158
+ venv.bak/
159
+
160
+ # Spyder project settings
161
+ .spyderproject
162
+ .spyproject
163
+
164
+ # Rope project settings
165
+ .ropeproject
166
+
167
+ # mkdocs documentation
168
+ /site
169
+
170
+ # mypy
171
+ .mypy_cache/
172
+ .dmypy.json
173
+ dmypy.json
174
+
175
+ # Pyre type checker
176
+ .pyre/
177
+
178
+ # pytype static type analyzer
179
+ .pytype/
180
+
181
+ # Cython debug symbols
182
+ cython_debug/
183
+
184
+ # PyCharm
185
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
186
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
187
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
188
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
189
+ # .idea/
190
+
191
+ # Abstra
192
+ # Abstra is an AI-powered process automation framework.
193
+ # Ignore directories containing user credentials, local state, and settings.
194
+ # Learn more at https://abstra.io/docs
195
+ .abstra/
196
+
197
+ # Visual Studio Code
198
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
199
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
200
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
201
+ # you could uncomment the following to ignore the entire vscode folder
202
+ # .vscode/
203
+ # Temporary file for partial code execution
204
+ tempCodeRunnerFile.py
205
+
206
+ # Ruff stuff:
207
+ .ruff_cache/
208
+
209
+ # PyPI configuration file
210
+ .pypirc
211
+
212
+ # Marimo
213
+ marimo/_static/
214
+ marimo/_lsp/
215
+ __marimo__/
216
+
217
+ # Streamlit
218
+ .streamlit/secrets.toml
@@ -0,0 +1,6 @@
1
+ .venv
2
+ dist
3
+ build
4
+ node_modules
5
+ *.lock
6
+ uv.lock
@@ -0,0 +1,4 @@
1
+ {
2
+ "tabWidth": 2,
3
+ "printWidth": 180
4
+ }
@@ -0,0 +1 @@
1
+ 3.13
@@ -0,0 +1,13 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented in this file. The format is based on
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to
5
+ [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.0.0] - 2026-09-18
10
+
11
+ ### Added
12
+
13
+ - Initial packaging: build with `uv build` and publish to PyPI from a GitHub Release.
clankers-0.0.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jakub Rada
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,41 @@
1
+ .PHONY: lint format check fix test build clean release release-dry-run
2
+
3
+ # Check lint and formatting (same checks as CI)
4
+ lint:
5
+ uv run ruff check .
6
+ uv run ruff format --check .
7
+ npx --yes prettier@3.9.6 --check .
8
+
9
+ # Alias for lint
10
+ check: lint
11
+
12
+ # Autofix lint issues and reformat
13
+ format:
14
+ uv run ruff check --fix .
15
+ uv run ruff format .
16
+ npx --yes prettier@3.9.6 --write .
17
+
18
+ # Alias for format
19
+ fix: format
20
+
21
+ test:
22
+ uv run --group dev pytest -q
23
+
24
+ # Build wheel and sdist into dist/, then validate the metadata PyPI will see
25
+ build: clean
26
+ uv build
27
+ uvx twine check dist/*
28
+
29
+ clean:
30
+ rm -rf dist build
31
+
32
+ # Cut a release: make release VERSION=0.1.0
33
+ # Bumps the version, tags it, and publishes a GitHub Release, which triggers the PyPI upload.
34
+ release:
35
+ @test -n "$(VERSION)" || (echo "usage: make release VERSION=0.1.0" >&2; exit 1)
36
+ uv run python scripts/release.py $(VERSION)
37
+
38
+ # Print every step of a release without changing anything
39
+ release-dry-run:
40
+ @test -n "$(VERSION)" || (echo "usage: make release-dry-run VERSION=0.1.0" >&2; exit 1)
41
+ uv run python scripts/release.py $(VERSION) --dry-run
@@ -0,0 +1,51 @@
1
+ Metadata-Version: 2.5
2
+ Name: clankers
3
+ Version: 0.0.0
4
+ Summary: Small Python library to automatically send notifications using the ntfy service
5
+ Project-URL: Repository, https://github.com/radajakub/clankers
6
+ Project-URL: Issues, https://github.com/radajakub/clankers/issues
7
+ Project-URL: Changelog, https://github.com/radajakub/clankers/blob/master/CHANGELOG.md
8
+ Author-email: Jakub Rada <dev.jakubrada@icloud.com>
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: alerts,monitoring,notifications,ntfy,push-notifications
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Topic :: Communications
17
+ Classifier: Topic :: System :: Monitoring
18
+ Classifier: Typing :: Typed
19
+ Requires-Python: >=3.13
20
+ Description-Content-Type: text/markdown
21
+
22
+ # clankers
23
+
24
+ Small Python library to automatically send notifications using ntfy service
25
+
26
+ ## Development
27
+
28
+ ```bash
29
+ uv sync --group dev
30
+ make check # ruff lint + format check + prettier
31
+ make fix # autofix and reformat
32
+ make test # pytest
33
+ make build # wheel + sdist into dist/, validated with twine
34
+ ```
35
+
36
+ ## Releasing
37
+
38
+ `make release VERSION=0.1.0` runs `scripts/release.py`, which bumps the version in `pyproject.toml`,
39
+ opens a dated section in `CHANGELOG.md`, commits, tags `v0.1.0`, pushes, and publishes a GitHub
40
+ Release. The Release event triggers `.github/workflows/publish.yml`, which builds and uploads to PyPI
41
+ via Trusted Publishing. It refuses to run unless you are on `master` with a clean tree in sync with
42
+ origin and the tag is unused.
43
+
44
+ Use `make release-dry-run VERSION=0.1.0` first to print every step without changing anything.
45
+
46
+ Describe changes under `## [Unreleased]` in `CHANGELOG.md` before releasing — that section becomes
47
+ the release notes.
48
+
49
+ One-time setup on [pypi.org](https://pypi.org/manage/account/publishing/): add a trusted publisher
50
+ for project `clankers` with owner `radajakub`, repository `clankers`, workflow `publish.yml` and
51
+ environment `pypi`.
@@ -0,0 +1,30 @@
1
+ # clankers
2
+
3
+ Small Python library to automatically send notifications using ntfy service
4
+
5
+ ## Development
6
+
7
+ ```bash
8
+ uv sync --group dev
9
+ make check # ruff lint + format check + prettier
10
+ make fix # autofix and reformat
11
+ make test # pytest
12
+ make build # wheel + sdist into dist/, validated with twine
13
+ ```
14
+
15
+ ## Releasing
16
+
17
+ `make release VERSION=0.1.0` runs `scripts/release.py`, which bumps the version in `pyproject.toml`,
18
+ opens a dated section in `CHANGELOG.md`, commits, tags `v0.1.0`, pushes, and publishes a GitHub
19
+ Release. The Release event triggers `.github/workflows/publish.yml`, which builds and uploads to PyPI
20
+ via Trusted Publishing. It refuses to run unless you are on `master` with a clean tree in sync with
21
+ origin and the tag is unused.
22
+
23
+ Use `make release-dry-run VERSION=0.1.0` first to print every step without changing anything.
24
+
25
+ Describe changes under `## [Unreleased]` in `CHANGELOG.md` before releasing — that section becomes
26
+ the release notes.
27
+
28
+ One-time setup on [pypi.org](https://pypi.org/manage/account/publishing/): add a trusted publisher
29
+ for project `clankers` with owner `radajakub`, repository `clankers`, workflow `publish.yml` and
30
+ environment `pypi`.
@@ -0,0 +1,47 @@
1
+ [project]
2
+ name = "clankers"
3
+ version = "0.0.0"
4
+ description = "Small Python library to automatically send notifications using the ntfy service"
5
+ readme = "README.md"
6
+ requires-python = ">=3.13"
7
+ license = "MIT"
8
+ license-files = ["LICENSE"]
9
+ authors = [{ name = "Jakub Rada", email = "dev.jakubrada@icloud.com" }]
10
+ keywords = ["ntfy", "notifications", "push-notifications", "alerts", "monitoring"]
11
+ classifiers = [
12
+ "Development Status :: 3 - Alpha",
13
+ "Intended Audience :: Developers",
14
+ "Programming Language :: Python :: 3",
15
+ "Programming Language :: Python :: 3.13",
16
+ "Topic :: Communications",
17
+ "Topic :: System :: Monitoring",
18
+ "Typing :: Typed",
19
+ ]
20
+ dependencies = []
21
+
22
+ [project.urls]
23
+ Repository = "https://github.com/radajakub/clankers"
24
+ Issues = "https://github.com/radajakub/clankers/issues"
25
+ Changelog = "https://github.com/radajakub/clankers/blob/master/CHANGELOG.md"
26
+
27
+ [build-system]
28
+ requires = ["hatchling"]
29
+ build-backend = "hatchling.build"
30
+
31
+ [tool.hatch.build.targets.wheel]
32
+ packages = ["src/clankers"]
33
+
34
+ [tool.pytest.ini_options]
35
+ pythonpath = ["src"]
36
+ testpaths = ["tests"]
37
+
38
+ [tool.ruff]
39
+ line-length = 180
40
+ target-version = "py313"
41
+
42
+ [tool.ruff.lint]
43
+ # Minimal set: pyflakes (F), essential pycodestyle errors (E4/E7/E9), import sorting (I).
44
+ select = ["E4", "E7", "E9", "F", "I"]
45
+
46
+ [dependency-groups]
47
+ dev = ["pytest>=9.1.1", "ruff>=0.16.0"]
@@ -0,0 +1,121 @@
1
+ #!/usr/bin/env python3
2
+ # Cut a release: bump the version, tag it, and publish a GitHub Release.
3
+ # The Release event triggers .github/workflows/publish.yml, which uploads to PyPI.
4
+ #
5
+ # Usage: make release VERSION=0.1.0 (or: uv run python scripts/release.py 0.1.0 [--dry-run])
6
+
7
+ import argparse
8
+ import re
9
+ import shutil
10
+ import subprocess
11
+ import sys
12
+ from datetime import date
13
+ from pathlib import Path
14
+
15
+ BRANCH = "master"
16
+ ROOT = Path(__file__).resolve().parent.parent
17
+ CHANGELOG = ROOT / "CHANGELOG.md"
18
+ UNRELEASED = "## [Unreleased]"
19
+ VERSION_PATTERN = re.compile(r"^\d+\.\d+\.\d+(?:(?:a|b|rc)\d+)?$")
20
+ TRACKED_FILES = ["pyproject.toml", "CHANGELOG.md", "uv.lock"]
21
+
22
+
23
+ class ReleaseError(Exception):
24
+ pass
25
+
26
+
27
+ def read(*args: str) -> str:
28
+ result = subprocess.run(args, cwd=ROOT, capture_output=True, text=True)
29
+ if result.returncode != 0:
30
+ raise ReleaseError(f"{' '.join(args)} failed: {result.stderr.strip()}")
31
+ return result.stdout.strip()
32
+
33
+
34
+ def execute(*args: str, dry_run: bool) -> None:
35
+ print(f"$ {' '.join(args)}")
36
+ if dry_run:
37
+ return
38
+ if subprocess.run(args, cwd=ROOT).returncode != 0:
39
+ raise ReleaseError(f"{' '.join(args)} failed")
40
+
41
+
42
+ def check_tools() -> None:
43
+ for tool in ("git", "uv", "gh"):
44
+ if shutil.which(tool) is None:
45
+ raise ReleaseError(f"{tool} is not installed")
46
+
47
+
48
+ def check_repo(tag: str) -> None:
49
+ if read("git", "rev-parse", "--abbrev-ref", "HEAD") != BRANCH:
50
+ raise ReleaseError(f"not on {BRANCH}")
51
+ if read("git", "status", "--porcelain"):
52
+ raise ReleaseError("working tree is dirty; commit or stash first")
53
+ read("git", "fetch", "--quiet", "origin", BRANCH, "--tags")
54
+ if read("git", "rev-parse", "HEAD") != read("git", "rev-parse", f"origin/{BRANCH}"):
55
+ raise ReleaseError(f"{BRANCH} is not in sync with origin/{BRANCH}")
56
+ if tag in read("git", "tag", "--list").splitlines():
57
+ raise ReleaseError(f"tag {tag} already exists")
58
+
59
+
60
+ # Everything between the Unreleased heading and the previous release's heading.
61
+ def unreleased_notes() -> str:
62
+ text = CHANGELOG.read_text()
63
+ if UNRELEASED not in text:
64
+ raise ReleaseError(f"{CHANGELOG.name} has no '{UNRELEASED}' section")
65
+ body = text.split(UNRELEASED, 1)[1]
66
+ return body.split("\n## [", 1)[0].strip()
67
+
68
+
69
+ def open_changelog_section(version: str, dry_run: bool) -> None:
70
+ heading = f"## [{version}] - {date.today().isoformat()}"
71
+ print(f"# {CHANGELOG.name}: insert '{heading}'")
72
+ if dry_run:
73
+ return
74
+ text = CHANGELOG.read_text()
75
+ CHANGELOG.write_text(text.replace(UNRELEASED, f"{UNRELEASED}\n\n{heading}", 1))
76
+
77
+
78
+ def commit_and_tag(tag: str, dry_run: bool) -> None:
79
+ files = [name for name in TRACKED_FILES if (ROOT / name).exists()]
80
+ execute("git", "add", *files, dry_run=dry_run)
81
+ execute("git", "commit", "-m", f"[Release] {tag}", dry_run=dry_run)
82
+ execute("git", "tag", "-a", tag, "-m", f"[Release] {tag}", dry_run=dry_run)
83
+ execute("git", "push", "origin", BRANCH, tag, dry_run=dry_run)
84
+
85
+
86
+ def main() -> int:
87
+ parser = argparse.ArgumentParser(description="Tag a release and publish it to PyPI.")
88
+ parser.add_argument("version", help="version to release, e.g. 0.1.0")
89
+ parser.add_argument("--dry-run", action="store_true", help="print every step without changing anything")
90
+ args = parser.parse_args()
91
+
92
+ version: str = args.version
93
+ dry_run: bool = args.dry_run
94
+ tag = f"v{version}"
95
+
96
+ try:
97
+ if not VERSION_PATTERN.match(version):
98
+ raise ReleaseError(f"'{version}' is not a valid version (expected X.Y.Z)")
99
+ check_tools()
100
+ check_repo(tag)
101
+
102
+ notes = unreleased_notes()
103
+ if not notes:
104
+ print(f"warning: {CHANGELOG.name} has nothing under {UNRELEASED}", file=sys.stderr)
105
+ notes = f"Release {tag}"
106
+
107
+ print(f"Releasing {read('uv', 'version', '--short')} -> {version}")
108
+ execute("uv", "version", version, dry_run=dry_run)
109
+ open_changelog_section(version, dry_run=dry_run)
110
+ commit_and_tag(tag, dry_run=dry_run)
111
+ execute("gh", "release", "create", tag, "--title", tag, "--notes", notes, dry_run=dry_run)
112
+ except ReleaseError as error:
113
+ print(f"error: {error}", file=sys.stderr)
114
+ return 1
115
+
116
+ print(f"Released {tag}. Publish workflow: gh run watch" if not dry_run else "Dry run complete; nothing changed.")
117
+ return 0
118
+
119
+
120
+ if __name__ == "__main__":
121
+ raise SystemExit(main())
File without changes
@@ -0,0 +1,5 @@
1
+ import clankers
2
+
3
+
4
+ def test_package_imports() -> None:
5
+ assert clankers is not None
clankers-0.0.0/uv.lock ADDED
@@ -0,0 +1,108 @@
1
+ version = 1
2
+ revision = 3
3
+ requires-python = ">=3.13"
4
+
5
+ [[package]]
6
+ name = "clankers"
7
+ version = "0.0.0"
8
+ source = { editable = "." }
9
+
10
+ [package.dev-dependencies]
11
+ dev = [
12
+ { name = "pytest" },
13
+ { name = "ruff" },
14
+ ]
15
+
16
+ [package.metadata]
17
+
18
+ [package.metadata.requires-dev]
19
+ dev = [
20
+ { name = "pytest", specifier = ">=9.1.1" },
21
+ { name = "ruff", specifier = ">=0.16.0" },
22
+ ]
23
+
24
+ [[package]]
25
+ name = "colorama"
26
+ version = "0.4.6"
27
+ source = { registry = "https://pypi.org/simple" }
28
+ sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" }
29
+ wheels = [
30
+ { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" },
31
+ ]
32
+
33
+ [[package]]
34
+ name = "iniconfig"
35
+ version = "2.3.0"
36
+ source = { registry = "https://pypi.org/simple" }
37
+ sdist = { url = "https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz", hash = "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730", size = 20503, upload-time = "2025-10-18T21:55:43.219Z" }
38
+ wheels = [
39
+ { url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484, upload-time = "2025-10-18T21:55:41.639Z" },
40
+ ]
41
+
42
+ [[package]]
43
+ name = "packaging"
44
+ version = "26.3"
45
+ source = { registry = "https://pypi.org/simple" }
46
+ sdist = { url = "https://files.pythonhosted.org/packages/7d/fa/3944b40b07da9ce895c0e6303a5ab7d53da063554f534556b134a54d6093/packaging-26.3.tar.gz", hash = "sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79", size = 313412, upload-time = "2026-08-04T18:15:28.737Z" }
47
+ wheels = [
48
+ { url = "https://files.pythonhosted.org/packages/63/34/ba1c580383c9eada3711951fef0795c80b829a078d72188184bcab9dd527/packaging-26.3-py3-none-any.whl", hash = "sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c", size = 129956, upload-time = "2026-08-04T18:15:27.159Z" },
49
+ ]
50
+
51
+ [[package]]
52
+ name = "pluggy"
53
+ version = "1.6.0"
54
+ source = { registry = "https://pypi.org/simple" }
55
+ sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" }
56
+ wheels = [
57
+ { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" },
58
+ ]
59
+
60
+ [[package]]
61
+ name = "pygments"
62
+ version = "2.21.0"
63
+ source = { registry = "https://pypi.org/simple" }
64
+ sdist = { url = "https://files.pythonhosted.org/packages/49/2e/ced460408999b33da6b31b0021b0f37d329e202d4169aeb164493778f25b/pygments-2.21.0.tar.gz", hash = "sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c", size = 5005329, upload-time = "2026-08-17T08:02:48.824Z" }
65
+ wheels = [
66
+ { url = "https://files.pythonhosted.org/packages/71/46/17f022dd3e953bf20a04a028a21ec746d942f8d2af30fa0f124fa0e6a684/pygments-2.21.0-py3-none-any.whl", hash = "sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9", size = 1250147, upload-time = "2026-08-17T08:02:44.912Z" },
67
+ ]
68
+
69
+ [[package]]
70
+ name = "pytest"
71
+ version = "9.1.1"
72
+ source = { registry = "https://pypi.org/simple" }
73
+ dependencies = [
74
+ { name = "colorama", marker = "sys_platform == 'win32'" },
75
+ { name = "iniconfig" },
76
+ { name = "packaging" },
77
+ { name = "pluggy" },
78
+ { name = "pygments" },
79
+ ]
80
+ sdist = { url = "https://files.pythonhosted.org/packages/e4/47/b9efed96c114afcfa3c9d3fe98a76a1d14c74a9e266d397cf6eb64be5e01/pytest-9.1.1.tar.gz", hash = "sha256:1088fbde8f2b49d95a549a195707afa7a76a3ce9bcadc26b6d71f0ffda5fe313", size = 1636369, upload-time = "2026-06-19T10:58:32.857Z" }
81
+ wheels = [
82
+ { url = "https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl", hash = "sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c", size = 386536, upload-time = "2026-06-19T10:58:31.347Z" },
83
+ ]
84
+
85
+ [[package]]
86
+ name = "ruff"
87
+ version = "0.16.8"
88
+ source = { registry = "https://pypi.org/simple" }
89
+ sdist = { url = "https://files.pythonhosted.org/packages/ba/78/449cb84790bd5cc3823b2652ee405a4558856e5c4195aee3a16bf7b3eb5d/ruff-0.16.8.tar.gz", hash = "sha256:9247bf92b5f04d825c8639a4fe423ec2e4222acd9222e58412b0dab7e442798b", size = 4938814, upload-time = "2026-09-16T15:54:46.688Z" }
90
+ wheels = [
91
+ { url = "https://files.pythonhosted.org/packages/ac/25/6071aabc530e9be7e2c195e8fe3f7aea2735405b6cf447212832d7811831/ruff-0.16.8-py3-none-linux_armv6l.whl", hash = "sha256:6ffbd6d87383c1edf5f6fa890f10200950240d7c1a16052a19a09d3a2307dd38", size = 10048966, upload-time = "2026-09-16T15:53:57.605Z" },
92
+ { url = "https://files.pythonhosted.org/packages/54/98/07f90ecbc74dd5fb5764f11f2bc774d6a7cffef92d2ff5f5b4e9e23c754e/ruff-0.16.8-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:42ed6b878ed61e3acca92f2730a17acff39286944ea82398544696366a6f925e", size = 10165498, upload-time = "2026-09-16T15:54:01.14Z" },
93
+ { url = "https://files.pythonhosted.org/packages/fe/1f/e6a712e3b47cad4a40600134105ed193cb773f618a42eb7ba323cb812cc0/ruff-0.16.8-py3-none-macosx_11_0_arm64.whl", hash = "sha256:7ea781c7f2afba8c6a505ea0fb3f994020249e0c450635f5381286fea6b46170", size = 9830004, upload-time = "2026-09-16T15:54:03.998Z" },
94
+ { url = "https://files.pythonhosted.org/packages/23/f2/311a08776d75d81c7676e20b6b020ae63cbe881fcdc7a8dd64e6e18bdd93/ruff-0.16.8-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8efeae3bbe414a5efefda11a792dfb51ef90ac48d50c4830de2f644caf3e8659", size = 9986558, upload-time = "2026-09-16T15:54:06.804Z" },
95
+ { url = "https://files.pythonhosted.org/packages/f3/ed/37b6cb3d3ba8c73e68ae3eb1d502383beb5aa05a582bb7bb3a922f929f54/ruff-0.16.8-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3a79b795469fef7fc6e908b218eed2eb17332afd85031db6480dc864560e69b2", size = 9877332, upload-time = "2026-09-16T15:54:09.552Z" },
96
+ { url = "https://files.pythonhosted.org/packages/22/cc/40873a8f36ad084cc540d55fcca7077264d5b13b24659e9180c176fb2b08/ruff-0.16.8-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3fdc5563cdc50555e6fba39322850860e9267c1b3d12c26a74729d8604c3c812", size = 10507125, upload-time = "2026-09-16T15:54:12.152Z" },
97
+ { url = "https://files.pythonhosted.org/packages/c3/e4/fc91a642b78ccbab6b9477720f3644ae7a10a9bcce69a934679cd64f62bc/ruff-0.16.8-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:34508983c70665578dab88f5223d8e6228307e1135398ca8bfc8b7e9501e282b", size = 11336694, upload-time = "2026-09-16T15:54:15.489Z" },
98
+ { url = "https://files.pythonhosted.org/packages/c2/3d/bbd2a9a600a4e73dc3e7548a249c8d1671273464b55822c6fae50f602dff/ruff-0.16.8-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:644bb578569e0ffc575741232bd385dacdd6fbe123f1a729e7a225f54aa3957f", size = 10774448, upload-time = "2026-09-16T15:54:18.16Z" },
99
+ { url = "https://files.pythonhosted.org/packages/1a/41/d83af9879a7b6e8bf5fe16b1da0b134049d2f5d3afac12defb0897cb84bd/ruff-0.16.8-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15e7d226246961db9235098333caa13063906d3851136b84c2900b82f5daa1df", size = 10323796, upload-time = "2026-09-16T15:54:20.743Z" },
100
+ { url = "https://files.pythonhosted.org/packages/f5/2c/cefd07bfe914b84943ea769ade8d607bd22750b965d3228eefd7cebd15d0/ruff-0.16.8-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:a2bf6bc3e9ebdd4449abc6f06cf64b98051a2c61cf94d2fe9596518c881f1a1e", size = 10514115, upload-time = "2026-09-16T15:54:23.497Z" },
101
+ { url = "https://files.pythonhosted.org/packages/f3/9d/76a2e26c79a23be6e6e3664c57bec9e9fc8de155cfb9e4b67ea91b64f9d7/ruff-0.16.8-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:6ca111ba0849539165e9e59d2b442542f3c1e8060ebbdea82494f1ffbccb1e1f", size = 10072582, upload-time = "2026-09-16T15:54:26.185Z" },
102
+ { url = "https://files.pythonhosted.org/packages/2e/d4/f42edddb39668af1a559ceafa3823aedd65633a48dc9768e775485faa2c1/ruff-0.16.8-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:359a1e5b495448ee1e91018064382ebc86f90e8aac2fed222c7d0e4e8df85fd2", size = 9879644, upload-time = "2026-09-16T15:54:29.278Z" },
103
+ { url = "https://files.pythonhosted.org/packages/f8/d4/913e3195d95e0378786c6656945c865f534a3560e29139da4882aff630d1/ruff-0.16.8-py3-none-musllinux_1_2_i686.whl", hash = "sha256:59e8f5681349474110b24d62e93cfda6593f5fa3473446ca3705200cac1a08b9", size = 10231569, upload-time = "2026-09-16T15:54:32.036Z" },
104
+ { url = "https://files.pythonhosted.org/packages/2b/c4/8aa6ea0bdcedbd1bf87397e2fc4ed8406448ea5842f8660bc6e5f163039d/ruff-0.16.8-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:efa3e7a16d1baaa79957888dfdf8be9ef2e44db81cb032af06d76632ab59e773", size = 10663666, upload-time = "2026-09-16T15:54:34.838Z" },
105
+ { url = "https://files.pythonhosted.org/packages/3d/02/7f10ef4700bc223c30a3fdd10631a29830c45524b810a3c7ed947af64591/ruff-0.16.8-py3-none-win32.whl", hash = "sha256:55793ba85c69921e89be061426d91a78652d6e50317c962240922747a4eb713f", size = 10093472, upload-time = "2026-09-16T15:54:37.47Z" },
106
+ { url = "https://files.pythonhosted.org/packages/1e/5d/a509c07d714b6da88f2c518b4637cf6f1d46b074be8f0f1e5fb9ff5126fe/ruff-0.16.8-py3-none-win_amd64.whl", hash = "sha256:a6b85621fd3c81e31fc5f5add09c9c078b430db3595ca632efafdec9e64ebfaa", size = 10586899, upload-time = "2026-09-16T15:54:40.488Z" },
107
+ { url = "https://files.pythonhosted.org/packages/fe/a0/50787329e4f20bf9dc9f6230015d46ec69c51a97ace5bc202dae4755365d/ruff-0.16.8-py3-none-win_arm64.whl", hash = "sha256:d075e820af612102ce217f07cc93e69f9490b10ec13ea85fa87bd03d996cef8a", size = 10386316, upload-time = "2026-09-16T15:54:43.332Z" },
108
+ ]