Repository navigation
Single-source the version and add a release workflow - #50
Merged
Merged
Conversation
## Summary The version was hardcoded in `pyproject.toml`, the repository had no release process, and there were no tags. ## Changes - `pylogkit/_version.py` holds the version. `pyproject.toml` reads it dynamically, so the build does not import the package or its dependencies, and `pylogkit.__version__` exposes it. - `.github/workflows/release.yml` runs on `v*` tags. It checks that the tag matches the version, builds the sdist and wheel, runs `twine check` and creates a GitHub release with generated notes. - `docs/releasing.md` documents the steps and the changelog convention. - Tests cover the single source of the version and the tag check in the workflow. ## Not included Publishing to PyPI is left out on purpose. The name `pylogkit` is taken there by an unrelated project (#44), so the distribution name has to be decided first. The release document says how to add trusted publishing afterwards. No tag is created by this change. ## Verification - A local build produces `pylogkit-0.1.0` with matching wheel metadata. - `pytest`, `ruff` and `mypy --strict` pass with the latest dependencies, and `pytest` passes with no extras. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U2nYHVGDdthQpcwNBPbp8r
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The version was hardcoded in
pyproject.toml, the repository had no release process, and there were no tags.Changes
pylogkit/_version.pyholds the version.pyproject.tomlreads it dynamically, so the build does not import the package or its dependencies, andpylogkit.__version__exposes it..github/workflows/release.ymlruns onv*tags. It checks that the tag matches the version, builds the sdist and wheel, runstwine checkand creates a GitHub release with generated notes.docs/releasing.mddocuments the steps and the changelog convention.Not included
Publishing to PyPI is left out on purpose. The name
pylogkitis taken there by an unrelated project (#44), so the distribution name has to be decided first. The release document says how to add trusted publishing afterwards. No tag is created by this change.Verification
pylogkit-0.1.0with matching wheel metadata.pytest,ruffandmypy --strictpass with the latest dependencies, andpytestpasses with no extras.Closes #20
🤖 Generated with Claude Code
https://claude.ai/code/session_01U2nYHVGDdthQpcwNBPbp8r
Generated by Claude Code