Conversation
Single source of truth for the package version is now version.txt. The
pyproject.toml declares ``dynamic = ["version"]`` and hatchling reads the
file at build time. CI gains an independent ``version-check`` job that
fails fast if the tag ``v{version}`` already exists, and a ``tag-release``
job that pushes the tag on merge to main. Pytest now skips on PRs that
don't touch ``src/`` or ``tests/`` (lint/scan still run on everything).
Adds a 2-line AGENTS.md telling agents to bump the version and stay in
the ``0.x.x`` alpha range.
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
version.txtis the new single source of truth for the package version (starts at0.1.0).pyproject.tomldeclaresdynamic = ["version"]and hatchling reads the file at build time ([tool.hatch.version]with a regex source). Build backend switched fromuv_buildtohatchlingso file-sourced dynamic versioning is supported.version-checkjob runs independently of lint/tests so a missed bump surfaces immediately while you still learn whether the rest of CI would have passed. It also enforces the0.x.xalpha range.tag-releasejob pushesv{version}afterversion-check+cisucceed.dorny/paths-filter@v3gates the pytest + coverage steps on changes undersrc/,tests/,pyproject.toml,uv.lock, or the workflow itself. Lint/format/secret-scan still run on every PR.AGENTS.md(2 lines): tells agents to bumpversion.txtand stay on0.x.x(alpha).Test plan
uv sync+uv sync --frozensucceed locally; resolveslose-it==0.1.0.uv buildproduceslose_it-0.1.0-py3-none-any.whland.tar.gz.uv run ruff check .andruff format --check .clean.uv run pytest --no-cov -q→ 161 passed, 5 skipped.version-checkrunning in parallel withci.version-checkwould fail ifversion.txtwere not bumped on a follow-up PR (verify on next PR).v0.1.0tag appears on the repo.