version-bumper 0.1.2__tar.gz → 0.3.1__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.
Files changed (107) hide show
  1. version_bumper-0.3.1/.github/workflows/release.yml +150 -0
  2. {version_bumper-0.1.2 → version_bumper-0.3.1}/.gitignore +4 -0
  3. {version_bumper-0.1.2 → version_bumper-0.3.1}/.pre-commit-config.yaml +13 -24
  4. version_bumper-0.3.1/.pymarkdown.json +47 -0
  5. version_bumper-0.3.1/.python-versions +4 -0
  6. version_bumper-0.3.1/.python-versions.license +3 -0
  7. version_bumper-0.3.1/.shellcheckrc +5 -0
  8. version_bumper-0.3.1/CHANGELOG.md +178 -0
  9. version_bumper-0.3.1/DEV-README.md +701 -0
  10. {version_bumper-0.1.2 → version_bumper-0.3.1}/PKG-INFO +128 -85
  11. {version_bumper-0.1.2 → version_bumper-0.3.1}/README.md +96 -58
  12. version_bumper-0.3.1/Taskfile.yml +278 -0
  13. version_bumper-0.3.1/docs/DEV-README.md +1 -0
  14. version_bumper-0.3.1/docs/index.md +1 -0
  15. {version_bumper-0.1.2 → version_bumper-0.3.1}/pyproject.toml +52 -225
  16. version_bumper-0.3.1/scripts/custom_argparse.py +488 -0
  17. version_bumper-0.3.1/scripts/dev-metrics.py +1406 -0
  18. version_bumper-0.3.1/scripts/generate_test_docs.py +190 -0
  19. version_bumper-0.3.1/scripts/metrics_cc_filter.py +79 -0
  20. {version_bumper-0.1.2 → version_bumper-0.3.1}/scripts/run-mypy-all-python-versions.sh +6 -4
  21. {version_bumper-0.1.2 → version_bumper-0.3.1}/scripts/swap_build_system.py +21 -16
  22. version_bumper-0.3.1/src/version_bumper/__init__.py +52 -0
  23. {version_bumper-0.1.2 → version_bumper-0.3.1}/src/version_bumper/__main__.py +44 -41
  24. {version_bumper-0.1.2 → version_bumper-0.3.1}/src/version_bumper/clibones/__init__.py +2 -2
  25. {version_bumper-0.1.2 → version_bumper-0.3.1}/src/version_bumper/clibones/application_settings.py +2 -2
  26. {version_bumper-0.1.2 → version_bumper-0.3.1}/src/version_bumper/clibones/config_file.py +46 -30
  27. {version_bumper-0.1.2 → version_bumper-0.3.1}/src/version_bumper/clibones/info_control.py +19 -10
  28. {version_bumper-0.1.2 → version_bumper-0.3.1}/src/version_bumper/clibones/json_config_file.py +10 -4
  29. {version_bumper-0.1.2 → version_bumper-0.3.1}/src/version_bumper/clibones/logger_control.py +31 -25
  30. {version_bumper-0.1.2 → version_bumper-0.3.1}/src/version_bumper/clibones/toml_config_file.py +10 -4
  31. {version_bumper-0.1.2 → version_bumper-0.3.1}/src/version_bumper/commands.py +85 -40
  32. version_bumper-0.3.1/src/version_bumper/py.typed +0 -0
  33. version_bumper-0.3.1/src/version_bumper/pyproject.py +119 -0
  34. {version_bumper-0.1.2 → version_bumper-0.3.1}/src/version_bumper/version.py +157 -109
  35. version_bumper-0.3.1/taskfiles/Taskfile-docs.yml +91 -0
  36. version_bumper-0.3.1/taskfiles/Taskfile-env.yml +72 -0
  37. version_bumper-0.3.1/taskfiles/Taskfile-format.yml +65 -0
  38. version_bumper-0.3.1/taskfiles/Taskfile-git.yml +37 -0
  39. version_bumper-0.3.1/taskfiles/Taskfile-lint.yml +257 -0
  40. version_bumper-0.3.1/taskfiles/Taskfile-metrics.yml +80 -0
  41. version_bumper-0.3.1/taskfiles/Taskfile-release.yml +196 -0
  42. version_bumper-0.3.1/taskfiles/Taskfile-test.yml +68 -0
  43. version_bumper-0.3.1/taskfiles/Taskfile-version.yml +132 -0
  44. version_bumper-0.3.1/taskfiles/helpers/task-docs-helper.py +114 -0
  45. version_bumper-0.3.1/taskfiles/helpers/task-env-helper.py +127 -0
  46. version_bumper-0.3.1/taskfiles/helpers/task-format-helper.py +157 -0
  47. version_bumper-0.3.1/taskfiles/helpers/task-helper.py +169 -0
  48. version_bumper-0.3.1/taskfiles/helpers/task-lint-helper.py +429 -0
  49. version_bumper-0.3.1/taskfiles/helpers/task-metrics-helper.py +58 -0
  50. version_bumper-0.3.1/taskfiles/helpers/task-version-helper.py +80 -0
  51. version_bumper-0.3.1/tests/conftest.py +35 -0
  52. {version_bumper-0.1.2 → version_bumper-0.3.1}/tests/test_app_version.py +7 -25
  53. version_bumper-0.3.1/tests/test_commands.py +157 -0
  54. version_bumper-0.3.1/tests/test_config_file.py +155 -0
  55. version_bumper-0.3.1/tests/test_info_control.py +36 -0
  56. version_bumper-0.3.1/tests/test_logger_control.py +55 -0
  57. version_bumper-0.3.1/tests/test_main.py +395 -0
  58. version_bumper-0.3.1/tests/test_pyproject.py +155 -0
  59. version_bumper-0.3.1/tests/test_version.py +393 -0
  60. {version_bumper-0.1.2 → version_bumper-0.3.1}/tox.ini +1 -1
  61. version_bumper-0.3.1/uv.lock +3181 -0
  62. version_bumper-0.3.1/uv.lock.license +3 -0
  63. version_bumper-0.3.1/zensical.toml +58 -0
  64. version_bumper-0.1.2/.hgignore +0 -17
  65. version_bumper-0.1.2/.idea/.gitignore +0 -8
  66. version_bumper-0.1.2/.idea/inspectionProfiles/Project_Default.xml +0 -29
  67. version_bumper-0.1.2/.idea/inspectionProfiles/profiles_settings.xml +0 -7
  68. version_bumper-0.1.2/.idea/misc.xml +0 -7
  69. version_bumper-0.1.2/.idea/modules.xml +0 -8
  70. version_bumper-0.1.2/.idea/ruff.xml +0 -7
  71. version_bumper-0.1.2/.idea/vcs.xml +0 -6
  72. version_bumper-0.1.2/.idea/version_bumper.iml +0 -18
  73. version_bumper-0.1.2/.idea/workspace.xml +0 -615
  74. version_bumper-0.1.2/DEV-README.md +0 -871
  75. version_bumper-0.1.2/Taskfile.yaml +0 -397
  76. version_bumper-0.1.2/docs/DEV-README.md +0 -592
  77. version_bumper-0.1.2/docs/index.md +0 -263
  78. version_bumper-0.1.2/mkdocs.yml +0 -80
  79. version_bumper-0.1.2/scripts/gen_ref_pages.py +0 -42
  80. version_bumper-0.1.2/scripts/metrics_cc_filter.py +0 -57
  81. version_bumper-0.1.2/src/version_bumper/__init__.py +0 -29
  82. version_bumper-0.1.2/src/version_bumper/pyproject.py +0 -61
  83. version_bumper-0.1.2/taskfiles/hatch-vars.yaml +0 -16
  84. version_bumper-0.1.2/taskfiles/hatch.yaml +0 -82
  85. version_bumper-0.1.2/taskfiles/poetry-vars.yaml +0 -16
  86. version_bumper-0.1.2/taskfiles/poetry.yaml +0 -78
  87. version_bumper-0.1.2/taskfiles/setuptools-vars.yaml +0 -16
  88. version_bumper-0.1.2/taskfiles/setuptools.yaml +0 -85
  89. version_bumper-0.1.2/tests/test_commands.py +0 -98
  90. version_bumper-0.1.2/tests/test_config_file.py +0 -98
  91. version_bumper-0.1.2/tests/test_info_control.py +0 -42
  92. version_bumper-0.1.2/tests/test_main.py +0 -529
  93. version_bumper-0.1.2/tests/test_pyproject.py +0 -65
  94. version_bumper-0.1.2/tests/test_version.py +0 -330
  95. {version_bumper-0.1.2 → version_bumper-0.3.1}/.cruft.json +0 -0
  96. {version_bumper-0.1.2 → version_bumper-0.3.1}/.cruft.json.license +0 -0
  97. /version_bumper-0.1.2/poetry.lock.license → /version_bumper-0.3.1/.pymarkdown.json.license +0 -0
  98. {version_bumper-0.1.2 → version_bumper-0.3.1}/LICENSES/MIT.txt +0 -0
  99. {version_bumper-0.1.2 → version_bumper-0.3.1}/scripts/fail_on_regex_match.sh +0 -0
  100. {version_bumper-0.1.2 → version_bumper-0.3.1}/scripts/latest_pypi_version.sh +0 -0
  101. {version_bumper-0.1.2 → version_bumper-0.3.1}/scripts/venv_runner.sh +0 -0
  102. {version_bumper-0.1.2 → version_bumper-0.3.1}/src/version_bumper/clibones/config_file_base.py +0 -0
  103. {version_bumper-0.1.2 → version_bumper-0.3.1}/tests/config_1.toml +0 -0
  104. {version_bumper-0.1.2 → version_bumper-0.3.1}/tests/config_2.toml +0 -0
  105. {version_bumper-0.1.2 → version_bumper-0.3.1}/tests/config_3.toml +0 -0
  106. {version_bumper-0.1.2 → version_bumper-0.3.1}/tests/config_4.toml +0 -0
  107. {version_bumper-0.1.2 → version_bumper-0.3.1}/tests/good_pyproject.toml +0 -0
@@ -0,0 +1,150 @@
1
+ # SPDX-FileCopyrightText: 2026 Roy Wright
2
+ #
3
+ # SPDX-License-Identifier: MIT
4
+
5
+ # Release workflow: `task release:tag` pushes a vX.Y.Z tag, which runs this workflow to
6
+ # 1. test the tagged commit under every Python version in .python-versions,
7
+ # 2. build the wheel and sdist, checking the tag matches the project version,
8
+ # 3. publish them to PyPI (trusted publishing, no API token),
9
+ # 4. create the GitHub release, with the CHANGELOG section as its notes.
10
+ #
11
+ # It can also be run by hand (Actions → Release → Run workflow) for a tag that already
12
+ # exists, ex: one pushed before this workflow was added.
13
+ #
14
+ # One-time setup:
15
+ # - on pypi.org, add a trusted publisher to the version_bumper project:
16
+ # owner royw, repository version_bumper, workflow release.yml, environment pypi
17
+ # - on GitHub, create the "pypi" environment (Settings → Environments); optionally
18
+ # add yourself as a required reviewer so each publish waits for approval.
19
+
20
+ name: Release
21
+
22
+ on:
23
+ push:
24
+ tags: ["v*"]
25
+ workflow_dispatch:
26
+ inputs:
27
+ tag:
28
+ description: "Existing tag to release, ex: v0.3.0"
29
+ required: true
30
+ type: string
31
+
32
+ permissions:
33
+ contents: read
34
+
35
+ concurrency:
36
+ group: release-${{ inputs.tag || github.ref_name }}
37
+ cancel-in-progress: false
38
+
39
+ env:
40
+ TAG: ${{ inputs.tag || github.ref_name }}
41
+
42
+ jobs:
43
+ python-versions:
44
+ name: Read .python-versions
45
+ runs-on: ubuntu-latest
46
+ outputs:
47
+ versions: ${{ steps.read.outputs.versions }}
48
+ steps:
49
+ - uses: actions/checkout@v7
50
+ with:
51
+ ref: ${{ env.TAG }}
52
+ persist-credentials: false
53
+ - id: read
54
+ run: |
55
+ versions=$(python3 -c 'import json, re, sys; print(json.dumps(re.findall(r"^\d+\.\d+", sys.stdin.read(), re.M)))' < .python-versions)
56
+ echo "versions=${versions}" >> "$GITHUB_OUTPUT"
57
+ echo "Testing with: ${versions}"
58
+
59
+ test:
60
+ name: Test (Python ${{ matrix.python }})
61
+ needs: python-versions
62
+ runs-on: ubuntu-latest
63
+ strategy:
64
+ fail-fast: true
65
+ matrix:
66
+ python: ${{ fromJSON(needs.python-versions.outputs.versions) }}
67
+ steps:
68
+ - uses: actions/checkout@v7
69
+ with:
70
+ ref: ${{ env.TAG }}
71
+ persist-credentials: false
72
+ - uses: astral-sh/setup-uv@v10.4.2 # setup-uv publishes no major-version tag
73
+ - name: Install
74
+ run: uv sync --locked --all-extras --python ${{ matrix.python }}
75
+ - name: Test (fails below the coverage floor in pyproject.toml)
76
+ run: uv run --no-sync pytest --cov=version_bumper
77
+
78
+ build:
79
+ name: Build
80
+ needs: test
81
+ runs-on: ubuntu-latest
82
+ steps:
83
+ - uses: actions/checkout@v7
84
+ with:
85
+ ref: ${{ env.TAG }}
86
+ persist-credentials: false
87
+ - uses: astral-sh/setup-uv@v10.4.2 # setup-uv publishes no major-version tag
88
+ - name: Check the tag matches the project version
89
+ run: |
90
+ version=$(uv run --no-project python -c \
91
+ 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')
92
+ if [ "v${version}" != "${TAG}" ]; then
93
+ echo "::error::Tag ${TAG} does not match the project version ${version}"
94
+ exit 1
95
+ fi
96
+ - name: Build
97
+ run: uv build
98
+ - uses: actions/upload-artifact@v7
99
+ with:
100
+ name: dist
101
+ path: dist/
102
+ if-no-files-found: error
103
+
104
+ publish-pypi:
105
+ name: Publish to PyPI
106
+ needs: build
107
+ runs-on: ubuntu-latest
108
+ environment:
109
+ name: pypi
110
+ url: https://pypi.org/p/version_bumper
111
+ permissions:
112
+ id-token: write # trusted publishing
113
+ steps:
114
+ - uses: actions/download-artifact@v8
115
+ with:
116
+ name: dist
117
+ path: dist/
118
+ - uses: pypa/gh-action-pypi-publish@release/v1
119
+
120
+ github-release:
121
+ name: Create GitHub release
122
+ needs: publish-pypi
123
+ runs-on: ubuntu-latest
124
+ permissions:
125
+ contents: write
126
+ steps:
127
+ - uses: actions/checkout@v7
128
+ with:
129
+ ref: ${{ env.TAG }}
130
+ persist-credentials: false
131
+ - uses: actions/download-artifact@v8
132
+ with:
133
+ name: dist
134
+ path: dist/
135
+ - name: Release notes from CHANGELOG.md
136
+ run: |
137
+ version="${TAG#v}"
138
+ awk -v heading="## [${version}]" \
139
+ 'index($0, heading) == 1 {found=1; next} found && /^## \[/ {exit} found {print}' \
140
+ CHANGELOG.md > notes.md
141
+ if [ ! -s notes.md ]; then
142
+ echo "::error::No [${version}] section in CHANGELOG.md"
143
+ exit 1
144
+ fi
145
+ - name: Create release
146
+ env:
147
+ GH_TOKEN: ${{ github.token }}
148
+ run:
149
+ gh release create "${TAG}" dist/* --verify-tag --title "${TAG}"
150
+ --notes-file notes.md
@@ -3,6 +3,7 @@
3
3
  # SPDX-License-Identifier: MIT
4
4
 
5
5
  .python-version
6
+ .vscode/
6
7
  dist/
7
8
  metrics/
8
9
  site/
@@ -10,6 +11,7 @@ site/
10
11
  .nox/
11
12
  .reuse/
12
13
  .coverage
14
+ coverage.xml
13
15
  **/__pycache__/*.pyc
14
16
  reuse.spdx
15
17
  **/*_cache/
@@ -19,3 +21,5 @@ taskfiles/front-end*.yaml
19
21
  **/requirements*.txt*
20
22
  src/*.egg-info
21
23
  REUSE.toml
24
+ docs/generated/
25
+ coverage.json
@@ -12,25 +12,27 @@ ci:
12
12
 
13
13
  repos:
14
14
  - repo: https://github.com/fsfe/reuse-tool
15
- rev: v3.0.2
15
+ rev: v6.3.0
16
16
  hooks:
17
17
  - id: reuse
18
+ exclude: ^(\.vscode/|uv\.lock$)
18
19
 
19
20
  - repo: https://github.com/asottile/pyupgrade
20
- rev: v3.16.0
21
+ rev: v3.22.0
21
22
  hooks:
22
23
  - id: pyupgrade
23
24
 
24
25
  - repo: https://github.com/adamchainz/blacken-docs
25
- rev: "1.16.0"
26
+ rev: "1.20.0"
26
27
  hooks:
27
28
  - id: blacken-docs
28
29
  additional_dependencies: [black==24.*]
29
30
 
30
31
  - repo: https://github.com/pre-commit/pre-commit-hooks
31
- rev: "v4.6.0"
32
+ rev: "v6.0.0"
32
33
  hooks:
33
34
  - id: check-added-large-files
35
+ exclude: ^uv\.lock$
34
36
  - id: check-case-conflict
35
37
  - id: check-merge-conflict
36
38
  - id: check-symlinks
@@ -55,11 +57,11 @@ repos:
55
57
  rev: "v4.0.0-alpha.8"
56
58
  hooks:
57
59
  - id: prettier
58
- types_or: [yaml, markdown, html, css, scss, javascript, json]
60
+ types_or: [yaml, html, css, scss, javascript, json]
59
61
  args: [--prose-wrap=always]
60
62
 
61
63
  - repo: https://github.com/astral-sh/ruff-pre-commit
62
- rev: "v0.5.0"
64
+ rev: "v0.17.5"
63
65
  hooks:
64
66
  - id: ruff
65
67
  args: ["--fix", "--show-fixes"]
@@ -77,9 +79,10 @@ repos:
77
79
  types: [python]
78
80
 
79
81
  - repo: https://github.com/codespell-project/codespell
80
- rev: "v2.3.0"
82
+ rev: "v2.4.3"
81
83
  hooks:
82
84
  - id: codespell
85
+ exclude: ^uv\.lock$
83
86
 
84
87
  # - repo: https://github.com/shellcheck-py/shellcheck-py
85
88
  # rev: "v0.10.0.1"
@@ -92,31 +95,17 @@ repos:
92
95
  name: Disallow improper capitalization
93
96
  language: pygrep
94
97
  entry: PyBind|Numpy|Cmake|CCache|Github|PyTest
95
- exclude: ^(\.pre-commit-config\.yaml|Taskfile.*\.ya?ml|.*\.md)$
98
+ exclude: ^(\.pre-commit-config\.yaml|.*Taskfile.*\.ya?ml|.*\.md)$
96
99
 
97
100
  - repo: https://github.com/abravalheri/validate-pyproject
98
- rev: "v0.18"
101
+ rev: "v0.27"
99
102
  hooks:
100
103
  - id: validate-pyproject
101
104
  additional_dependencies: ["validate-pyproject-schema-store[all]"]
102
105
 
103
106
  - repo: https://github.com/python-jsonschema/check-jsonschema
104
- rev: "0.28.6"
107
+ rev: "0.39.0"
105
108
  hooks:
106
109
  - id: check-dependabot
107
110
  - id: check-github-workflows
108
111
  - id: check-readthedocs
109
-
110
- - repo: local
111
- hooks:
112
- - id: task_pre_commit
113
- name: task_pre_commit
114
- entry: task pre-commit
115
- pass_filenames: false
116
- language: python
117
- # use your preferred Python version
118
- language_version: python3.12
119
- types: [python]
120
- verbose: true
121
- additional_dependencies:
122
- - check-pyproject@git+https://github.com/royw/check_pyproject.git
@@ -0,0 +1,47 @@
1
+ {
2
+ "plugins": {
3
+ "line-length": {
4
+ "enabled": true,
5
+ "line_length": 120,
6
+ "code_block_line_length": 120
7
+ },
8
+ "no-duplicate-heading": {
9
+ "enabled": false
10
+ },
11
+ "md013": {
12
+ "enabled": false
13
+ },
14
+ "md022": {
15
+ "enabled": false
16
+ },
17
+ "md024": {
18
+ "enabled": false,
19
+ "siblings_only": true
20
+ },
21
+ "md026": {
22
+ "enabled": true,
23
+ "punctuation": ".,;:!?"
24
+ },
25
+ "md033": {
26
+ "enabled": true
27
+ },
28
+ "md034": {
29
+ "enabled": true
30
+ },
31
+ "md036": {
32
+ "enabled": false
33
+ },
34
+ "md041": {
35
+ "enabled": false
36
+ },
37
+ "md042": {
38
+ "enabled": true
39
+ },
40
+ "md045": {
41
+ "enabled": true
42
+ },
43
+ "md047": {
44
+ "enabled": true
45
+ }
46
+ }
47
+ }
@@ -0,0 +1,4 @@
1
+ 3.11
2
+ 3.12
3
+ 3.13
4
+ 3.14
@@ -0,0 +1,3 @@
1
+ SPDX-FileCopyrightText: 2024 Roy Wright
2
+
3
+ SPDX-License-Identifier: MIT
@@ -0,0 +1,5 @@
1
+ # SPDX-FileCopyrightText: 2024 Roy Wright
2
+ #
3
+ # SPDX-License-Identifier: MIT
4
+
5
+ external-sources=true
@@ -0,0 +1,178 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2024 Roy Wright
3
+
4
+ SPDX-License-Identifier: MIT
5
+ -->
6
+
7
+ # Changelog
8
+
9
+ All notable changes to this project will be documented in this file.
10
+
11
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
12
+ and this project adheres to
13
+ [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
14
+
15
+ ## [Unreleased]
16
+
17
+ ### Added
18
+
19
+ ### Changed
20
+
21
+ ### Fixed
22
+
23
+ ## [0.3.1] - 2026-12-05
24
+
25
+ ### Added
26
+
27
+ - Release workflow: pushing a `vX.Y.Z` tag (`task release:tag`) tests it
28
+ under every supported Python, builds, publishes to PyPI and creates the
29
+ GitHub release. It can also be run by hand for an existing tag.
30
+
31
+ ### Changed
32
+
33
+ ### Fixed
34
+
35
+ - Tests failed when a test of `main()` ran earlier in the same pytest worker:
36
+ `main()` left a log handler on that test's closed output stream. Each test
37
+ now removes the log handlers it added.
38
+
39
+ ## [0.3.0] - 2026-12-05
40
+
41
+ ### Added
42
+
43
+ - `bump` accepts several parts, applied in order: `bump minor a` takes
44
+ 1.0b2 to 1.1a1, and `bump patch dev` takes 1.0 to 1.0.1.dev1.
45
+ - `py.typed` marker (PEP 561) and the `Typing :: Typed` classifier, so type
46
+ checkers use version_bumper's type hints instead of treating it as untyped.
47
+
48
+ ### Changed
49
+
50
+ - **Breaking:** `bump` refuses a bump that would lower the version, such as
51
+ `bump a` on 1.0b2 (→ 1.0a1) or `bump rc` on 1.0 (→ 1.0rc1), and leaves
52
+ the file unchanged. The error suggests a release part to bump as well, or
53
+ `version X` to set a version exactly. A bump that changes only the local
54
+ label (`+...`) is still allowed.
55
+ - Python 3.13 and 3.14 are tested (`.python-versions`, tox) and listed in
56
+ the classifiers.
57
+ - `task check` runs the tests with coverage and fails below 100% line and
58
+ branch coverage (`fail_under` in `pyproject.toml`; abstract methods are
59
+ excluded). Tests no longer read or write the real
60
+ `~/.config/version_bumper.toml`.
61
+ - Tests restructured: CLI, version, command, and config-file tests are
62
+ parametrized (each case reports separately), use pytest's `tmp_path`
63
+ instead of writing under `tests/tmp/`, and the command tests remove the
64
+ loguru handler they add. Weak assertions (partial JSON key matching,
65
+ length-only checks, missing assertions) now check exact results.
66
+ - Split `get_command`, `Version.set` and `Version` part clearing, and the
67
+ `--version` lookup into smaller helpers so every function in `src/` has a
68
+ cyclomatic and cognitive complexity of at most 5. No behavior change.
69
+ - Complexity limit of 5 is now enforced for all project Python code:
70
+ `metrics:complexity` fails on any function above 5 (radon cyclomatic for
71
+ `src/`, `scripts/`, and `taskfiles/helpers/`; complexipy cognitive for those
72
+ plus `tests/`, no longer excluding `clibones/`), and ruff's `C901` uses
73
+ `max-complexity = 5`. The dev scripts and Taskfile helpers were refactored
74
+ to meet it, with no behavior change.
75
+ - Removed the unused `sphinx` optional dependencies (furo, myst-parser,
76
+ sphinx, sphinx-autodoc-typehints, sphinx-copybutton) and the matching
77
+ Poetry group; documentation is built solely with Zensical.
78
+ - Removed Poetry from the development setup: the `[tool.poetry]` tables in
79
+ `pyproject.toml`, the `check-pyproject` task, pre-commit hook and dev
80
+ dependency, the `poetry` option in `scripts/swap_build_system.py`, and
81
+ `poetry.lock.license`. `version_bumper` itself still reads and updates
82
+ `tool.poetry.version` in other projects.
83
+
84
+ ### Fixed
85
+
86
+ - `task test:all` only worked for the Python version already in `.venv`: for
87
+ the others it recreated `.venv` without the test dependencies and failed.
88
+ It now runs each version in an isolated environment.
89
+ - `scripts/run-mypy-all-python-versions.sh` read `.python-version` (one
90
+ version) instead of `.python-versions`, and passed whenever the last
91
+ version passed; it now checks every version and fails if any fails.
92
+ - A config file that cannot be parsed (`--config FILE`, or the default
93
+ `~/.config/version_bumper.toml`, which is read on every run) crashed with a
94
+ traceback. It is now a usage error (exit 2) naming the file.
95
+ - A config file's `pyproject_toml_path` (for example one written by
96
+ `--save-config-as`) was ignored: the `--pyproject` default of each command
97
+ overrode it, so `./pyproject.toml` was used instead.
98
+ - A `pyproject.toml` that cannot be read or written (for example in a
99
+ read-only directory) is reported as an error naming the file instead of a
100
+ `PermissionError` traceback.
101
+ - `scripts/dev-metrics.py` test-type filtering: the test file and test SLOC
102
+ counts searched the whole tests directory instead of the selected test type
103
+ subdirectories (so non-type directories such as `tests/helpers/` were
104
+ counted), and a tests path that is itself a test type directory (for example
105
+ `--tests tests/unit --test-type unit`) was dropped, so its tests were not
106
+ counted, files directly under `tests/` were counted as its unit tests, and
107
+ coverage ran the whole test suite.
108
+ - Writing `pyproject.toml` no longer changes its permissions to `0600`, and a
109
+ symlinked `pyproject.toml` now has its target updated instead of the link
110
+ being replaced by a regular file.
111
+ - `bump local` increments multi-digit trailing numbers correctly and keeps zero
112
+ padding (`foo19` → `foo20`, not `foo110`).
113
+ - `get` exits with an error when none of the requested versions exist, instead
114
+ of printing nothing and exiting 0.
115
+ - `--json`/`--text` help said they controlled input; they select the output
116
+ format. `--longhelp` now describes the commands instead of template text.
117
+ - `set` on an integer part (epoch, major, minor, patch) with a missing or
118
+ non-integer value reports a clear error instead of `invalid literal for int()`, and negative values are rejected.
119
+ - The development-checkout fallback version is PEP 440 normal form
120
+ (`0.2.1.dev0` instead of `0.2.1dev`).
121
+ - A malformed `pyproject.toml` (for example a non-table `project` or a
122
+ non-string `version`) is reported as an error instead of a traceback.
123
+ - Security: raised the `setuptools` dev dependency to `>=83.0.0,<85.0.0`
124
+ (GHSA-xmj3-9gf7-h52w, CVE-2026-59890) and dropped `soupsieve`
125
+ (CVE-2026-126190, CVE-2026-126191, CVE-2026-126193), which was only
126
+ pulled in by the Sphinx `furo` theme.
127
+
128
+ ## [0.2.1] - 2026-11-15
129
+
130
+ ### Changed
131
+
132
+ - `uv.lock` is now tracked in version control; `task version:bump` commits it
133
+ alongside `pyproject.toml`.
134
+ - `task env:check` uses `uv tool run` for pymarkdownlnt instead of relying on
135
+ a global tool install.
136
+
137
+ ### Fixed
138
+
139
+ - `task release:prepare` runs pre-commit hooks before the clean-tree gate so
140
+ hook rewrites cannot land mid-pipeline, and warns when uncommitted changes
141
+ remain (the project is not ready for `task release:tag`).
142
+
143
+ ## [0.2.0] - 2026-11-15
144
+
145
+ ### Added
146
+
147
+ - PEP 440-correct `Version` ordering via `packaging.version.Version` with a
148
+ release-width tiebreaker; `Version` is now hashable, type-safe in
149
+ comparisons, and preserves release segments beyond patch.
150
+ - Tests for PEP 440 ordering, hashing, extra release segments, config
151
+ save/load paths, missing tables/files, and clibones coverage (now at 98%).
152
+
153
+ ### Changed
154
+
155
+ - `version` command outputs the normalized version string.
156
+ - `get` warns on missing keys instead of printing `None`; `--all` is wired up.
157
+ - Dependency pins widened and development tools upgraded (pytest 9.2,
158
+ ruff 0.17.5, mypy 2.4.1, sphinx 9.0.4, twine 7.0.0).
159
+ - Taskfiles reorganized into namespaced taskfiles
160
+ (`docs`, `env`, `format`, `git`, `lint`, `metrics`, `release`, `test`,
161
+ `version`) with cross-platform Python helpers.
162
+ - Documentation build migrated from MkDocs to Zensical
163
+ (`zensical.toml`, `api-autonav` + `mkdocstrings` for the code reference).
164
+ - `DEV-README.md` and `README.md` refreshed for the uv-only workflow:
165
+ removed obsolete MkDocs/`switch-to-*` backend switching docs and updated
166
+ task examples to the namespaced taskfile commands.
167
+ - Refactored `Version.bump`/`set`/`__str__`, `PyProject.load_version`/
168
+ `save_version`, `Settings.validate_arguments`, `LoggerControl.setup`, and
169
+ `ConfigFile.parser`/`save_config_file` to extract helpers so all functions
170
+ rate radon grade A (cyclomatic complexity < 6).
171
+
172
+ ### Fixed
173
+
174
+ - `--save-config`/`--save-config-as` no longer crash on `Path` values.
175
+ - `PyProject.save_version` writes the dotted key's leaf and cleans up temp
176
+ files on failure.
177
+ - `InfoControl` version fallback uses `__version__`; development fallback
178
+ prefers `project.version`.