From 31a21f00d6148d220354730ac5e0f685f68de9b9 Mon Sep 17 00:00:00 2001 From: Stephen Kent Date: Sat, 25 Apr 2026 23:50:02 -0700 Subject: [PATCH] Improve release workflow using `bump-my-version` --- docs/project-release.md | 15 +- docs/releasing.md | 15 +- pyproject.toml | 12 + template/pyproject.toml.jinja | 12 + ...= 'public' %}releasing.md{% endif %}.jinja | 15 +- tests/__snapshots__/test_docs.ambr | 259 +++++++++++++++++- tests/__snapshots__/test_pyproject.ambr | 168 ++++++++++++ tests/test_docs.py | 9 + 8 files changed, 486 insertions(+), 19 deletions(-) diff --git a/docs/project-release.md b/docs/project-release.md index cb61b97..5f6841d 100644 --- a/docs/project-release.md +++ b/docs/project-release.md @@ -7,11 +7,19 @@ icon: lucide/rocket Release version numbers should follow [Semantic Versioning][semver]. -To create a new release, simply create and push a tag with the new release -version number: +To create a release, run `poe release` with one of `patch`, `minor`, or `major` +corresponding to the version number component to update: + +```sh +poe release patch|minor|major +``` + +A new tag with the new release version number will be created automatically +using [bump-my-version][bump-my-version] (for example, `v1.2.3`). + +Afterward, push the new release tag: ```sh -git tag vX.Y.Z # for example, v1.2.3 git push --tags ``` @@ -21,5 +29,6 @@ git push --tags * If container image build and publishing is enabled, a container image will be built and published to the [GitHub Container Registry (GHCR)][ghcr-docs]. +[bump-my-version]: https://callowayproject.github.io/bump-my-version/ [ghcr-docs]: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry [semver]: https://semver.org/ diff --git a/docs/releasing.md b/docs/releasing.md index c4e4cf4..f787285 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -7,11 +7,19 @@ icon: lucide/rocket Release version numbers should follow [Semantic Versioning][semver]. -To create a new release, simply create and push a tag with the new release -version number: +To create a release, run `poe release` with one of `patch`, `minor`, or `major` +corresponding to the version number component to update: + +```sh +poe release patch|minor|major +``` + +A new tag with the new release version number will be created automatically +using [bump-my-version][bump-my-version] (for example, `v1.2.3`). + +Afterward, push the new release tag: ```sh -git tag vX.Y.Z # for example, v1.2.3 git push --tags ``` @@ -24,6 +32,7 @@ git push --tags [![PyPI][pypi-badge]][pypi-project] +[bump-my-version]: https://callowayproject.github.io/bump-my-version/ [github-release-latest]: https://github.com/smkent/copier-python/releases/latest [github-releases]: https://github.com/smkent/copier-python/releases [github-release-badge]: https://img.shields.io/github/v/release/smkent/copier-python diff --git a/pyproject.toml b/pyproject.toml index bc3fbe9..57ee554 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,6 +38,7 @@ Issues = "https://github.com/smkent/copier-python/issues" [dependency-groups] dev = [ + "bump-my-version>=1.3.0", "copier>=9", "poethepoet>=0.42", "prek>=0.3", @@ -53,6 +54,13 @@ docs = [ "zensical>=0.0.33", ] +[tool.bumpversion] +commit = false +tag = true +tag_name = "v{new_version}" +tag_message = "" +push = true + [tool.hatch.build.targets.sdist] include = ["/copier_python", "/tests", "*.md", "LICENSE"] @@ -107,6 +115,10 @@ help = "Initialize git repository once on project creation" cmd = "prek run --all-files" help = "Run all formatters and static checks" +[tool.poe.tasks.release] +cmd = "bump-my-version bump -v" +help = "Create and push a release tag (patch/minor/major)" + [tool.poe.tasks.lt] sequence = [{ref = "lint"}, {ref = "test"}] help = "Run all formatters, static checks and tests" diff --git a/template/pyproject.toml.jinja b/template/pyproject.toml.jinja index 41b434e..6c37f6b 100644 --- a/template/pyproject.toml.jinja +++ b/template/pyproject.toml.jinja @@ -43,6 +43,7 @@ Issues = "https://github.com/{{ github_user }}/{{ project_name }}/issues" [dependency-groups] dev = [ + "bump-my-version>=1.3.0", "poethepoet>=0.42", "prek>=0.3", {%- if project_visibility == 'public' %} @@ -61,6 +62,13 @@ docs = [ ] {%- endif %} +[tool.bumpversion] +commit = false +tag = true +tag_name = "v{new_version}" +tag_message = "" +push = true + [tool.hatch.build.targets.sdist] include = ["/{{ project_slug }}", "/tests", "*.md", "LICENSE"] @@ -125,6 +133,10 @@ help = "Run all formatters and static checks" sequence = [{ref = "lint"}, {ref = "test"}] help = "Run all formatters, static checks and tests" +[tool.poe.tasks.release] +cmd = "bump-my-version bump -v" +help = "Create and push a release tag (patch/minor/major)" + [tool.poe.tasks.setup] sequence = [ {cmd = "uv sync"}, diff --git a/template/{% if enable_docs %}docs{% endif %}/{% if project_visibility == 'public' %}releasing.md{% endif %}.jinja b/template/{% if enable_docs %}docs{% endif %}/{% if project_visibility == 'public' %}releasing.md{% endif %}.jinja index c846459..bde265c 100644 --- a/template/{% if enable_docs %}docs{% endif %}/{% if project_visibility == 'public' %}releasing.md{% endif %}.jinja +++ b/template/{% if enable_docs %}docs{% endif %}/{% if project_visibility == 'public' %}releasing.md{% endif %}.jinja @@ -8,11 +8,19 @@ icon: lucide/rocket Release version numbers should follow [Semantic Versioning][semver]. -To create a new release, simply create and push a tag with the new release -version number: +To create a release, run `poe release` with one of `patch`, `minor`, or `major` +corresponding to the version number component to update: + +```sh +poe release patch|minor|major +``` + +A new tag with the new release version number will be created automatically +using [bump-my-version][bump-my-version] (for example, `v1.2.3`). + +Afterward, push the new release tag: ```sh -git tag vX.Y.Z # for example, v1.2.3 git push --tags ``` @@ -32,6 +40,7 @@ git push --tags the [GitHub Container Registry (GHCR)][ghcr-docs]. {%- endif %} +[bump-my-version]: https://callowayproject.github.io/bump-my-version/ {% if enable_container -%} [ghcr-project]: {{ repo_url }}/pkgs/container/{{ project_name }} {% endif -%} diff --git a/tests/__snapshots__/test_docs.ambr b/tests/__snapshots__/test_docs.ambr index 043a595..738e208 100644 --- a/tests/__snapshots__/test_docs.ambr +++ b/tests/__snapshots__/test_docs.ambr @@ -445,7 +445,7 @@ ''' # --- -# name: test_docs_features[no_pypi] +# name: test_docs_features[container-no_pypi] ''' --- title: One time setup @@ -477,6 +477,13 @@ Ensure the [Renovate app][renovate] is installed on your account, then enable it for `ness/PKFire`. + ## Container registry (ghcr.io) + + Enable write access for Actions: + + [Settings → Actions → General][repo-settings-actions-general] + → Workflow permissions → Read and write permissions + ## GitHub Pages [Settings → Pages][repo-settings-pages] → Source → GitHub Actions @@ -484,12 +491,13 @@ [renovate]: https://github.com/apps/renovate [repo-releases]: https://github.com/ness/PKFire/releases [repo-settings]: https://github.com/ness/PKFire/settings + [repo-settings-actions-general]: https://github.com/ness/PKFire/settings/actions [repo-settings-branches]: https://github.com/ness/PKFire/settings/branches [repo-settings-pages]: https://github.com/ness/PKFire/settings/pages ''' # --- -# name: test_docs_features[no_pypi].1 +# name: test_docs_features[container-no_pypi].1 ''' --- title: Releasing a new version @@ -500,11 +508,19 @@ Release version numbers should follow [Semantic Versioning][semver]. - To create a new release, simply create and push a tag with the new release - version number: + To create a release, run `poe release` with one of `patch`, `minor`, or `major` + corresponding to the version number component to update: + + ```sh + poe release patch|minor|major + ``` + + A new tag with the new release version number will be created automatically + using [bump-my-version][bump-my-version] (for example, `v1.2.3`). + + Afterward, push the new release tag: ```sh - git tag vX.Y.Z # for example, v1.2.3 git push --tags ``` @@ -513,6 +529,11 @@ [![GitHub Release][github-release-badge]][github-release-latest] + * A container image will be built and published to + the [GitHub Container Registry (GHCR)][ghcr-docs]. + + [bump-my-version]: https://callowayproject.github.io/bump-my-version/ + [ghcr-project]: https://github.com/ness/PKFire/pkgs/container/PKFire [github-release-badge]: https://img.shields.io/github/v/release/ness/PKFire [github-release-latest]: https://github.com/ness/PKFire/releases/latest [github-releases]: https://github.com/ness/PKFire/releases @@ -520,7 +541,7 @@ ''' # --- -# name: test_docs_features[pypi] +# name: test_docs_features[container-pypi] ''' --- title: One time setup @@ -572,6 +593,13 @@ git push --tags ``` + ## Container registry (ghcr.io) + + Enable write access for Actions: + + [Settings → Actions → General][repo-settings-actions-general] + → Workflow permissions → Read and write permissions + ## GitHub Pages [Settings → Pages][repo-settings-pages] → Source → GitHub Actions @@ -581,13 +609,14 @@ [renovate]: https://github.com/apps/renovate [repo-releases]: https://github.com/ness/PKFire/releases [repo-settings]: https://github.com/ness/PKFire/settings + [repo-settings-actions-general]: https://github.com/ness/PKFire/settings/actions [repo-settings-envs]: https://github.com/ness/PKFire/settings/environments [repo-settings-branches]: https://github.com/ness/PKFire/settings/branches [repo-settings-pages]: https://github.com/ness/PKFire/settings/pages ''' # --- -# name: test_docs_features[pypi].1 +# name: test_docs_features[container-pypi].1 ''' --- title: Releasing a new version @@ -598,11 +627,220 @@ Release version numbers should follow [Semantic Versioning][semver]. - To create a new release, simply create and push a tag with the new release - version number: + To create a release, run `poe release` with one of `patch`, `minor`, or `major` + corresponding to the version number component to update: + + ```sh + poe release patch|minor|major + ``` + + A new tag with the new release version number will be created automatically + using [bump-my-version][bump-my-version] (for example, `v1.2.3`). + + Afterward, push the new release tag: + + ```sh + git push --tags + ``` + + * A corresponding [GitHub release][github-releases] + will be created automatically. + + [![GitHub Release][github-release-badge]][github-release-latest] + + * A release package will be built and [uploaded to PyPI][pypi-project]. + + [![PyPI][pypi-badge]][pypi-project] + + * A container image will be built and published to + the [GitHub Container Registry (GHCR)][ghcr-docs]. + + [bump-my-version]: https://callowayproject.github.io/bump-my-version/ + [ghcr-project]: https://github.com/ness/PKFire/pkgs/container/PKFire + [github-release-badge]: https://img.shields.io/github/v/release/ness/PKFire + [github-release-latest]: https://github.com/ness/PKFire/releases/latest + [github-releases]: https://github.com/ness/PKFire/releases + [pypi-badge]: https://img.shields.io/pypi/v/PKFire + [pypi-project]: https://pypi.org/project/PKFire/ + [semver]: https://semver.org/ + + ''' +# --- +# name: test_docs_features[no_container-no_pypi] + ''' + --- + title: One time setup + icon: lucide/package-plus + --- + + # One time setup + + These steps only need to be completed once after the project is first created. + + ## GitHub repository + + [Settings → General][repo-settings]: + + - [x] Allow merge commits + - [ ] Allow squash merging + - [ ] Allow rebase merging + - [x] Automatically delete head branches + + [Settings → Branches][repo-settings-branches] → Add branch protection rule + for the Default branch (`main`): + + - [x] Restrict deletions + - [x] Require a pull request before merging + - [x] Block force pushes + + ## Renovate + + Ensure the [Renovate app][renovate] is installed on your account, then + enable it for `ness/PKFire`. + + ## GitHub Pages + + [Settings → Pages][repo-settings-pages] → Source → GitHub Actions + + [renovate]: https://github.com/apps/renovate + [repo-releases]: https://github.com/ness/PKFire/releases + [repo-settings]: https://github.com/ness/PKFire/settings + [repo-settings-branches]: https://github.com/ness/PKFire/settings/branches + [repo-settings-pages]: https://github.com/ness/PKFire/settings/pages + + ''' +# --- +# name: test_docs_features[no_container-no_pypi].1 + ''' + --- + title: Releasing a new version + icon: lucide/rocket + --- + + # Releasing a new version + + Release version numbers should follow [Semantic Versioning][semver]. + + To create a release, run `poe release` with one of `patch`, `minor`, or `major` + corresponding to the version number component to update: + + ```sh + poe release patch|minor|major + ``` + + A new tag with the new release version number will be created automatically + using [bump-my-version][bump-my-version] (for example, `v1.2.3`). + + Afterward, push the new release tag: + + ```sh + git push --tags + ``` + + * A corresponding [GitHub release][github-releases] + will be created automatically. + + [![GitHub Release][github-release-badge]][github-release-latest] + + [bump-my-version]: https://callowayproject.github.io/bump-my-version/ + [github-release-badge]: https://img.shields.io/github/v/release/ness/PKFire + [github-release-latest]: https://github.com/ness/PKFire/releases/latest + [github-releases]: https://github.com/ness/PKFire/releases + [semver]: https://semver.org/ + + ''' +# --- +# name: test_docs_features[no_container-pypi] + ''' + --- + title: One time setup + icon: lucide/package-plus + --- + + # One time setup + + These steps only need to be completed once after the project is first created. + + ## GitHub repository + + [Settings → General][repo-settings]: + + - [x] Allow merge commits + - [ ] Allow squash merging + - [ ] Allow rebase merging + - [x] Automatically delete head branches + + [Settings → Branches][repo-settings-branches] → Add branch protection rule + for the Default branch (`main`): + + - [x] Restrict deletions + - [x] Require a pull request before merging + - [x] Block force pushes + + ## Renovate + + Ensure the [Renovate app][renovate] is installed on your account, then + enable it for `ness/PKFire`. + + ## PyPI publishing + + This project uses [trusted publishing][pypi-trusted-publishing] so no API tokens + need to be stored as secrets. + + 1. On PyPI, add a (pending) trusted publisher in your + [Trusted Publisher Management][pypi-publishing-settings] settings: + - Publisher: GitHub Actions + - Owner: `ness` + - Repository: `PKFire` + - Workflow: `release.yaml` + - Environment: `pypi` + 2. Create the `pypi` environment in the GitHub repository: + [Settings → Environments][repo-settings-envs] → New environment → `pypi` + 3. Publish a release by pushing a tag: + ```sh + git tag v0.1.0 # or your desired first version number + git push --tags + ``` + + ## GitHub Pages + + [Settings → Pages][repo-settings-pages] → Source → GitHub Actions + + [pypi-publishing-settings]: https://pypi.org/manage/account/publishing/ + [pypi-trusted-publishing]: https://docs.pypi.org/trusted-publishers/ + [renovate]: https://github.com/apps/renovate + [repo-releases]: https://github.com/ness/PKFire/releases + [repo-settings]: https://github.com/ness/PKFire/settings + [repo-settings-envs]: https://github.com/ness/PKFire/settings/environments + [repo-settings-branches]: https://github.com/ness/PKFire/settings/branches + [repo-settings-pages]: https://github.com/ness/PKFire/settings/pages + + ''' +# --- +# name: test_docs_features[no_container-pypi].1 + ''' + --- + title: Releasing a new version + icon: lucide/rocket + --- + + # Releasing a new version + + Release version numbers should follow [Semantic Versioning][semver]. + + To create a release, run `poe release` with one of `patch`, `minor`, or `major` + corresponding to the version number component to update: + + ```sh + poe release patch|minor|major + ``` + + A new tag with the new release version number will be created automatically + using [bump-my-version][bump-my-version] (for example, `v1.2.3`). + + Afterward, push the new release tag: ```sh - git tag vX.Y.Z # for example, v1.2.3 git push --tags ``` @@ -615,6 +853,7 @@ [![PyPI][pypi-badge]][pypi-project] + [bump-my-version]: https://callowayproject.github.io/bump-my-version/ [github-release-badge]: https://img.shields.io/github/v/release/ness/PKFire [github-release-latest]: https://github.com/ness/PKFire/releases/latest [github-releases]: https://github.com/ness/PKFire/releases diff --git a/tests/__snapshots__/test_pyproject.ambr b/tests/__snapshots__/test_pyproject.ambr index 1b28eca..bbdad6e 100644 --- a/tests/__snapshots__/test_pyproject.ambr +++ b/tests/__snapshots__/test_pyproject.ambr @@ -36,6 +36,7 @@ [dependency-groups] dev = [ + "bump-my-version>=1.3.0", "poethepoet>=0.42", "prek>=0.3", "pytest>=9", @@ -49,6 +50,13 @@ "zensical>=0.0.33", ] + [tool.bumpversion] + commit = false + tag = true + tag_name = "v{new_version}" + tag_message = "" + push = true + [tool.hatch.build.targets.sdist] include = ["/pkfire", "/tests", "*.md", "LICENSE"] @@ -101,6 +109,10 @@ sequence = [{ref = "lint"}, {ref = "test"}] help = "Run all formatters, static checks and tests" + [tool.poe.tasks.release] + cmd = "bump-my-version bump -v" + help = "Create and push a release tag (patch/minor/major)" + [tool.poe.tasks.setup] sequence = [ {cmd = "uv sync"}, @@ -249,6 +261,7 @@ [dependency-groups] dev = [ + "bump-my-version>=1.3.0", "poethepoet>=0.42", "prek>=0.3", "pysentry-rs>=0.4", @@ -263,6 +276,13 @@ "zensical>=0.0.33", ] + [tool.bumpversion] + commit = false + tag = true + tag_name = "v{new_version}" + tag_message = "" + push = true + [tool.hatch.build.targets.sdist] include = ["/pkfire", "/tests", "*.md", "LICENSE"] @@ -321,6 +341,10 @@ sequence = [{ref = "lint"}, {ref = "test"}] help = "Run all formatters, static checks and tests" + [tool.poe.tasks.release] + cmd = "bump-my-version bump -v" + help = "Create and push a release tag (patch/minor/major)" + [tool.poe.tasks.setup] sequence = [ {cmd = "uv sync"}, @@ -460,6 +484,7 @@ [dependency-groups] dev = [ + "bump-my-version>=1.3.0", "poethepoet>=0.42", "prek>=0.3", "pytest>=9", @@ -473,6 +498,13 @@ "zensical>=0.0.33", ] + [tool.bumpversion] + commit = false + tag = true + tag_name = "v{new_version}" + tag_message = "" + push = true + [tool.hatch.build.targets.sdist] include = ["/pkfire", "/tests", "*.md", "LICENSE"] @@ -525,6 +557,10 @@ sequence = [{ref = "lint"}, {ref = "test"}] help = "Run all formatters, static checks and tests" + [tool.poe.tasks.release] + cmd = "bump-my-version bump -v" + help = "Create and push a release tag (patch/minor/major)" + [tool.poe.tasks.setup] sequence = [ {cmd = "uv sync"}, @@ -649,6 +685,7 @@ [dependency-groups] dev = [ + "bump-my-version>=1.3.0", "poethepoet>=0.42", "prek>=0.3", "pysentry-rs>=0.4", @@ -663,6 +700,13 @@ "zensical>=0.0.33", ] + [tool.bumpversion] + commit = false + tag = true + tag_name = "v{new_version}" + tag_message = "" + push = true + [tool.hatch.build.targets.sdist] include = ["/pkfire", "/tests", "*.md", "LICENSE"] @@ -721,6 +765,10 @@ sequence = [{ref = "lint"}, {ref = "test"}] help = "Run all formatters, static checks and tests" + [tool.poe.tasks.release] + cmd = "bump-my-version bump -v" + help = "Create and push a release tag (patch/minor/major)" + [tool.poe.tasks.setup] sequence = [ {cmd = "uv sync"}, @@ -844,6 +892,7 @@ [dependency-groups] dev = [ + "bump-my-version>=1.3.0", "poethepoet>=0.42", "prek>=0.3", "pytest>=9", @@ -853,6 +902,13 @@ "ty>=0.0.31", ] + [tool.bumpversion] + commit = false + tag = true + tag_name = "v{new_version}" + tag_message = "" + push = true + [tool.hatch.build.targets.sdist] include = ["/pkfire", "/tests", "*.md", "LICENSE"] @@ -884,6 +940,10 @@ sequence = [{ref = "lint"}, {ref = "test"}] help = "Run all formatters, static checks and tests" + [tool.poe.tasks.release] + cmd = "bump-my-version bump -v" + help = "Create and push a release tag (patch/minor/major)" + [tool.poe.tasks.setup] sequence = [ {cmd = "uv sync"}, @@ -1032,6 +1092,7 @@ [dependency-groups] dev = [ + "bump-my-version>=1.3.0", "poethepoet>=0.42", "prek>=0.3", "pysentry-rs>=0.4", @@ -1042,6 +1103,13 @@ "ty>=0.0.31", ] + [tool.bumpversion] + commit = false + tag = true + tag_name = "v{new_version}" + tag_message = "" + push = true + [tool.hatch.build.targets.sdist] include = ["/pkfire", "/tests", "*.md", "LICENSE"] @@ -1079,6 +1147,10 @@ sequence = [{ref = "lint"}, {ref = "test"}] help = "Run all formatters, static checks and tests" + [tool.poe.tasks.release] + cmd = "bump-my-version bump -v" + help = "Create and push a release tag (patch/minor/major)" + [tool.poe.tasks.setup] sequence = [ {cmd = "uv sync"}, @@ -1218,6 +1290,7 @@ [dependency-groups] dev = [ + "bump-my-version>=1.3.0", "poethepoet>=0.42", "prek>=0.3", "pytest>=9", @@ -1227,6 +1300,13 @@ "ty>=0.0.31", ] + [tool.bumpversion] + commit = false + tag = true + tag_name = "v{new_version}" + tag_message = "" + push = true + [tool.hatch.build.targets.sdist] include = ["/pkfire", "/tests", "*.md", "LICENSE"] @@ -1258,6 +1338,10 @@ sequence = [{ref = "lint"}, {ref = "test"}] help = "Run all formatters, static checks and tests" + [tool.poe.tasks.release] + cmd = "bump-my-version bump -v" + help = "Create and push a release tag (patch/minor/major)" + [tool.poe.tasks.setup] sequence = [ {cmd = "uv sync"}, @@ -1382,6 +1466,7 @@ [dependency-groups] dev = [ + "bump-my-version>=1.3.0", "poethepoet>=0.42", "prek>=0.3", "pysentry-rs>=0.4", @@ -1392,6 +1477,13 @@ "ty>=0.0.31", ] + [tool.bumpversion] + commit = false + tag = true + tag_name = "v{new_version}" + tag_message = "" + push = true + [tool.hatch.build.targets.sdist] include = ["/pkfire", "/tests", "*.md", "LICENSE"] @@ -1429,6 +1521,10 @@ sequence = [{ref = "lint"}, {ref = "test"}] help = "Run all formatters, static checks and tests" + [tool.poe.tasks.release] + cmd = "bump-my-version bump -v" + help = "Create and push a release tag (patch/minor/major)" + [tool.poe.tasks.setup] sequence = [ {cmd = "uv sync"}, @@ -1555,6 +1651,7 @@ [dependency-groups] dev = [ + "bump-my-version>=1.3.0", "poethepoet>=0.42", "prek>=0.3", "pysentry-rs>=0.4", @@ -1569,6 +1666,13 @@ "zensical>=0.0.33", ] + [tool.bumpversion] + commit = false + tag = true + tag_name = "v{new_version}" + tag_message = "" + push = true + [tool.hatch.build.targets.sdist] include = ["/pkfire", "/tests", "*.md", "LICENSE"] @@ -1627,6 +1731,10 @@ sequence = [{ref = "lint"}, {ref = "test"}] help = "Run all formatters, static checks and tests" + [tool.poe.tasks.release] + cmd = "bump-my-version bump -v" + help = "Create and push a release tag (patch/minor/major)" + [tool.poe.tasks.setup] sequence = [ {cmd = "uv sync"}, @@ -1761,6 +1869,7 @@ [dependency-groups] dev = [ + "bump-my-version>=1.3.0", "poethepoet>=0.42", "prek>=0.3", "pysentry-rs>=0.4", @@ -1775,6 +1884,13 @@ "zensical>=0.0.33", ] + [tool.bumpversion] + commit = false + tag = true + tag_name = "v{new_version}" + tag_message = "" + push = true + [tool.hatch.build.targets.sdist] include = ["/pkfire", "/tests", "*.md", "LICENSE"] @@ -1833,6 +1949,10 @@ sequence = [{ref = "lint"}, {ref = "test"}] help = "Run all formatters, static checks and tests" + [tool.poe.tasks.release] + cmd = "bump-my-version bump -v" + help = "Create and push a release tag (patch/minor/major)" + [tool.poe.tasks.setup] sequence = [ {cmd = "uv sync"}, @@ -1961,6 +2081,7 @@ [dependency-groups] dev = [ + "bump-my-version>=1.3.0", "poethepoet>=0.42", "prek>=0.3", "pysentry-rs>=0.4", @@ -1975,6 +2096,13 @@ "zensical>=0.0.33", ] + [tool.bumpversion] + commit = false + tag = true + tag_name = "v{new_version}" + tag_message = "" + push = true + [tool.hatch.build.targets.sdist] include = ["/pkfire", "/tests", "*.md", "LICENSE"] @@ -2033,6 +2161,10 @@ sequence = [{ref = "lint"}, {ref = "test"}] help = "Run all formatters, static checks and tests" + [tool.poe.tasks.release] + cmd = "bump-my-version bump -v" + help = "Create and push a release tag (patch/minor/major)" + [tool.poe.tasks.setup] sequence = [ {cmd = "uv sync"}, @@ -2179,6 +2311,7 @@ [dependency-groups] dev = [ + "bump-my-version>=1.3.0", "poethepoet>=0.42", "prek>=0.3", "pysentry-rs>=0.4", @@ -2193,6 +2326,13 @@ "zensical>=0.0.33", ] + [tool.bumpversion] + commit = false + tag = true + tag_name = "v{new_version}" + tag_message = "" + push = true + [tool.hatch.build.targets.sdist] include = ["/pkfire", "/tests", "*.md", "LICENSE"] @@ -2251,6 +2391,10 @@ sequence = [{ref = "lint"}, {ref = "test"}] help = "Run all formatters, static checks and tests" + [tool.poe.tasks.release] + cmd = "bump-my-version bump -v" + help = "Create and push a release tag (patch/minor/major)" + [tool.poe.tasks.setup] sequence = [ {cmd = "uv sync"}, @@ -2389,6 +2533,7 @@ [dependency-groups] dev = [ + "bump-my-version>=1.3.0", "poethepoet>=0.42", "prek>=0.3", "pysentry-rs>=0.4", @@ -2403,6 +2548,13 @@ "zensical>=0.0.33", ] + [tool.bumpversion] + commit = false + tag = true + tag_name = "v{new_version}" + tag_message = "" + push = true + [tool.hatch.build.targets.sdist] include = ["/pkfire", "/tests", "*.md", "LICENSE"] @@ -2461,6 +2613,10 @@ sequence = [{ref = "lint"}, {ref = "test"}] help = "Run all formatters, static checks and tests" + [tool.poe.tasks.release] + cmd = "bump-my-version bump -v" + help = "Create and push a release tag (patch/minor/major)" + [tool.poe.tasks.setup] sequence = [ {cmd = "uv sync"}, @@ -2607,6 +2763,7 @@ [dependency-groups] dev = [ + "bump-my-version>=1.3.0", "poethepoet>=0.42", "prek>=0.3", "pysentry-rs>=0.4", @@ -2621,6 +2778,13 @@ "zensical>=0.0.33", ] + [tool.bumpversion] + commit = false + tag = true + tag_name = "v{new_version}" + tag_message = "" + push = true + [tool.hatch.build.targets.sdist] include = ["/pkfire", "/tests", "*.md", "LICENSE"] @@ -2679,6 +2843,10 @@ sequence = [{ref = "lint"}, {ref = "test"}] help = "Run all formatters, static checks and tests" + [tool.poe.tasks.release] + cmd = "bump-my-version bump -v" + help = "Create and push a release tag (patch/minor/major)" + [tool.poe.tasks.setup] sequence = [ {cmd = "uv sync"}, diff --git a/tests/test_docs.py b/tests/test_docs.py index 871684d..7e0f673 100644 --- a/tests/test_docs.py +++ b/tests/test_docs.py @@ -11,14 +11,23 @@ "enable_pypi", [pytest.param(True, id="pypi"), pytest.param(False, id="no_pypi")], ) +@pytest.mark.parametrize( + "enable_container", + [ + pytest.param(True, id="container"), + pytest.param(False, id="no_container"), + ], +) def test_docs_features( render_template: Callable[..., Path], snapshot: SnapshotAssertion, *, + enable_container: bool, enable_pypi: bool, ) -> None: rendered = render_template( project_visibility="public", + enable_container=enable_container, enable_pypi=enable_pypi, enable_docs=True, )