version-bumper 0.1.2__tar.gz → 0.1.3__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.
- {version_bumper-0.1.2 → version_bumper-0.1.3}/.gitignore +2 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/.idea/workspace.xml +57 -57
- {version_bumper-0.1.2 → version_bumper-0.1.3}/.pre-commit-config.yaml +1 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/DEV-README.md +22 -10
- {version_bumper-0.1.2 → version_bumper-0.1.3}/PKG-INFO +22 -18
- {version_bumper-0.1.2 → version_bumper-0.1.3}/README.md +19 -16
- {version_bumper-0.1.2 → version_bumper-0.1.3}/Taskfile.yaml +15 -2
- {version_bumper-0.1.2 → version_bumper-0.1.3}/docs/index.md +0 -1
- {version_bumper-0.1.2 → version_bumper-0.1.3}/pyproject.toml +11 -6
- {version_bumper-0.1.2 → version_bumper-0.1.3}/src/version_bumper/pyproject.py +2 -1
- version_bumper-0.1.3/taskfiles/uv-vars.yaml +16 -0
- version_bumper-0.1.3/taskfiles/uv.yaml +69 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/tests/test_config_file.py +3 -5
- {version_bumper-0.1.2 → version_bumper-0.1.3}/.cruft.json +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/.cruft.json.license +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/.hgignore +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/.idea/.gitignore +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/.idea/inspectionProfiles/Project_Default.xml +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/.idea/inspectionProfiles/profiles_settings.xml +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/.idea/misc.xml +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/.idea/modules.xml +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/.idea/ruff.xml +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/.idea/vcs.xml +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/.idea/version_bumper.iml +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/LICENSES/MIT.txt +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/docs/DEV-README.md +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/mkdocs.yml +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/poetry.lock.license +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/scripts/fail_on_regex_match.sh +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/scripts/gen_ref_pages.py +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/scripts/latest_pypi_version.sh +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/scripts/metrics_cc_filter.py +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/scripts/run-mypy-all-python-versions.sh +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/scripts/swap_build_system.py +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/scripts/venv_runner.sh +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/src/version_bumper/__init__.py +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/src/version_bumper/__main__.py +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/src/version_bumper/clibones/__init__.py +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/src/version_bumper/clibones/application_settings.py +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/src/version_bumper/clibones/config_file.py +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/src/version_bumper/clibones/config_file_base.py +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/src/version_bumper/clibones/info_control.py +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/src/version_bumper/clibones/json_config_file.py +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/src/version_bumper/clibones/logger_control.py +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/src/version_bumper/clibones/toml_config_file.py +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/src/version_bumper/commands.py +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/src/version_bumper/version.py +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/taskfiles/hatch-vars.yaml +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/taskfiles/hatch.yaml +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/taskfiles/poetry-vars.yaml +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/taskfiles/poetry.yaml +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/taskfiles/setuptools-vars.yaml +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/taskfiles/setuptools.yaml +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/tests/config_1.toml +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/tests/config_2.toml +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/tests/config_3.toml +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/tests/config_4.toml +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/tests/good_pyproject.toml +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/tests/test_app_version.py +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/tests/test_commands.py +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/tests/test_info_control.py +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/tests/test_main.py +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/tests/test_pyproject.py +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/tests/test_version.py +0 -0
- {version_bumper-0.1.2 → version_bumper-0.1.3}/tox.ini +0 -0
|
@@ -5,11 +5,7 @@
|
|
|
5
5
|
</component>
|
|
6
6
|
<component name="ChangeListManager">
|
|
7
7
|
<list default="true" id="bdf489a7-b068-4e9c-b042-e8df4d689613" name="Changes" comment="correct case where pyproject.toml does not have a tool.poetry table.">
|
|
8
|
-
<change beforePath="$PROJECT_DIR$/mkdocs.yml" beforeDir="false" afterPath="$PROJECT_DIR$/mkdocs.yml" afterDir="false" />
|
|
9
|
-
<change beforePath="$PROJECT_DIR$/poetry.lock" beforeDir="false" />
|
|
10
8
|
<change beforePath="$PROJECT_DIR$/pyproject.toml" beforeDir="false" afterPath="$PROJECT_DIR$/pyproject.toml" afterDir="false" />
|
|
11
|
-
<change beforePath="$PROJECT_DIR$/src/version_bumper/pyproject.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/version_bumper/pyproject.py" afterDir="false" />
|
|
12
|
-
<change beforePath="$PROJECT_DIR$/tests/test_pyproject.py" beforeDir="false" afterPath="$PROJECT_DIR$/tests/test_pyproject.py" afterDir="false" />
|
|
13
9
|
</list>
|
|
14
10
|
<option name="SHOW_DIALOG" value="false" />
|
|
15
11
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
@@ -46,59 +42,59 @@
|
|
|
46
42
|
<option name="hideEmptyMiddlePackages" value="true" />
|
|
47
43
|
<option name="showLibraryContents" value="true" />
|
|
48
44
|
</component>
|
|
49
|
-
<component name="PropertiesComponent"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
45
|
+
<component name="PropertiesComponent"><![CDATA[{
|
|
46
|
+
"keyToString": {
|
|
47
|
+
"Python tests.pytest for test_commands.test_bump_version_error_handling.executor": "Coverage",
|
|
48
|
+
"Python tests.pytest for test_main.test_bump_patch.executor": "Debug",
|
|
49
|
+
"Python tests.pytest for test_main.test_file_not_found.executor": "Run",
|
|
50
|
+
"Python tests.pytest for test_main.test_get_json_both.executor": "Debug",
|
|
51
|
+
"Python tests.pytest for test_main.test_invalid_version.executor": "Run",
|
|
52
|
+
"Python tests.pytest for test_main.test_no_arguments.executor": "Debug",
|
|
53
|
+
"Python tests.pytest for test_main.test_set_file_not_found.executor": "Run",
|
|
54
|
+
"Python tests.pytest for test_pyproject.test_load_invalid_key.executor": "Debug",
|
|
55
|
+
"Python tests.pytest for test_pyproject.test_save_version.executor": "Run",
|
|
56
|
+
"Python tests.pytest for test_version.test_normalizations.executor": "Debug",
|
|
57
|
+
"Python tests.pytest for test_version.test_separators.executor": "Run",
|
|
58
|
+
"Python tests.pytest for test_version.test_set.executor": "Run",
|
|
59
|
+
"Python tests.pytest for tests.executor": "Coverage",
|
|
60
|
+
"Python tests.pytest for tests.test_commands.executor": "Run",
|
|
61
|
+
"Python tests.pytest for tests.test_commands.test_bump_version_no_poetry_version.executor": "Run",
|
|
62
|
+
"Python tests.pytest for tests.test_main.executor": "Run",
|
|
63
|
+
"Python tests.pytest for tests.test_main.test_invalid_version.executor": "Debug",
|
|
64
|
+
"Python tests.pytest for tests.test_main.test_main_version.executor": "Debug",
|
|
65
|
+
"Python tests.pytest for tests.test_main.test_set_no_arguments.executor": "Run",
|
|
66
|
+
"Python tests.pytest for tests.test_version.executor": "Run",
|
|
67
|
+
"Python tests.pytest for tests.test_version.test_bump.executor": "Debug",
|
|
68
|
+
"Python tests.pytest for tests.test_version.test_major_minor.executor": "Debug",
|
|
69
|
+
"Python tests.pytest for tests.test_version.test_modify.executor": "Debug",
|
|
70
|
+
"Python tests.pytest for tests.test_version.test_none_less_than_none.executor": "Run",
|
|
71
|
+
"Python tests.pytest for tests.test_version.test_set.executor": "Debug",
|
|
72
|
+
"Python tests.pytest for tests.test_version.test_set_invalid_part.executor": "Run",
|
|
73
|
+
"Python tests.pytest in test_app_version.py.executor": "Coverage",
|
|
74
|
+
"Python tests.pytest in test_commands.py.executor": "Coverage",
|
|
75
|
+
"Python tests.pytest in test_config_file.py.executor": "Coverage",
|
|
76
|
+
"Python tests.pytest in test_info_control.py.executor": "Coverage",
|
|
77
|
+
"Python tests.pytest in test_main.py.executor": "Debug",
|
|
78
|
+
"Python tests.pytest in test_pyproject.py.executor": "Debug",
|
|
79
|
+
"Python tests.pytest in test_version.py.executor": "Run",
|
|
80
|
+
"Python tests.pytest in tests.executor": "Debug",
|
|
81
|
+
"Python.__main__.executor": "Debug",
|
|
82
|
+
"RunOnceActivity.ShowReadmeOnStart": "true",
|
|
83
|
+
"RunOnceActivity.git.unshallow": "true",
|
|
84
|
+
"git-widget-placeholder": "main",
|
|
85
|
+
"junie.onboarding.icon.badge.shown": "true",
|
|
86
|
+
"last_opened_file_path": "/home/royw/src/lumberjack",
|
|
87
|
+
"node.js.detected.package.eslint": "true",
|
|
88
|
+
"node.js.detected.package.tslint": "true",
|
|
89
|
+
"node.js.selected.package.eslint": "(autodetect)",
|
|
90
|
+
"node.js.selected.package.tslint": "(autodetect)",
|
|
91
|
+
"nodejs_package_manager_path": "npm",
|
|
92
|
+
"settings.editor.selected.configurable": "watcher.settings",
|
|
93
|
+
"two.files.diff.last.used.file": "/home/royw/src/check_pyproject/Taskfile.yaml",
|
|
94
|
+
"two.files.diff.last.used.folder": "/home/royw/src/check_pyproject/src/check_pyproject",
|
|
95
|
+
"vue.rearranger.settings.migration": "true"
|
|
100
96
|
}
|
|
101
|
-
}
|
|
97
|
+
}]]></component>
|
|
102
98
|
<component name="RecentsManager">
|
|
103
99
|
<key name="CopyFile.RECENT_KEYS">
|
|
104
100
|
<recent name="$PROJECT_DIR$" />
|
|
@@ -280,7 +276,11 @@
|
|
|
280
276
|
<workItem from="1725131662317" duration="960000" />
|
|
281
277
|
<workItem from="1745083392604" duration="8395000" />
|
|
282
278
|
<workItem from="1745183267678" duration="402000" />
|
|
283
|
-
<workItem from="1745183677344" duration="
|
|
279
|
+
<workItem from="1745183677344" duration="6867000" />
|
|
280
|
+
<workItem from="1745710255988" duration="661000" />
|
|
281
|
+
<workItem from="1745875437304" duration="1014000" />
|
|
282
|
+
<workItem from="1745881850364" duration="8000" />
|
|
283
|
+
<workItem from="1747254763115" duration="41000" />
|
|
284
284
|
</task>
|
|
285
285
|
<task id="LOCAL-00001" summary="initial coding">
|
|
286
286
|
<option name="closed" value="true" />
|
|
@@ -85,13 +85,17 @@ like [hatch](https://hatch.pypa.io/),
|
|
|
85
85
|
[flit](https://packaging.python.org/en/latest/key_projects/#flit). Even
|
|
86
86
|
[Setuptools](https://setuptools.pypa.io/) is staying in the race.
|
|
87
87
|
|
|
88
|
-
So I decided this development environment will support Poetry, Hatch, and
|
|
88
|
+
So I decided this development environment will support uv, Poetry, Hatch, and
|
|
89
89
|
Setuptools.
|
|
90
90
|
|
|
91
91
|
Poetry is opinionated, uses non-standard revision syntax, and is a little dated
|
|
92
92
|
on its `pyproject.toml` usage (most settings - at least until poetry version 2
|
|
93
93
|
is released, are in the `tool.poetry` table).
|
|
94
94
|
|
|
95
|
+
uv is now the default development frontend. It manages the project's virtual
|
|
96
|
+
environment and lockfile while still using the configured build backend from
|
|
97
|
+
`pyproject.toml`.
|
|
98
|
+
|
|
95
99
|
Hatch is hard core standards based, even if they have to wait for the standard
|
|
96
100
|
to be adopted. Should be interesting...
|
|
97
101
|
|
|
@@ -120,6 +124,7 @@ fantastic!
|
|
|
120
124
|
Support:
|
|
121
125
|
|
|
122
126
|
- [Task](https://taskfile.dev/)
|
|
127
|
+
- [uv](https://docs.astral.sh/uv/)
|
|
123
128
|
- [Poetry](https://python-poetry.org/)
|
|
124
129
|
- [Hatch](https://hatch.pypa.io/)
|
|
125
130
|
- [Setuptools](https://setuptools.pypa.io/)
|
|
@@ -151,6 +156,7 @@ then answering the project questions. To use, you need to run:
|
|
|
151
156
|
|
|
152
157
|
cd program_slug # from the cookiecutter questions
|
|
153
158
|
pyenv local 3.11 3.12 # or whatever python versions you need
|
|
159
|
+
task switch-to-uv
|
|
154
160
|
task init
|
|
155
161
|
task build
|
|
156
162
|
|
|
@@ -160,7 +166,7 @@ A couple of useful commands:
|
|
|
160
166
|
|
|
161
167
|
task # shows available tasks
|
|
162
168
|
less Taskfile.yml # shows the commands that form each task. Feel free to customize.
|
|
163
|
-
|
|
169
|
+
uv lock # refresh the uv.lock file from pyproject.toml
|
|
164
170
|
|
|
165
171
|
## 20,000 meter view
|
|
166
172
|
|
|
@@ -194,6 +200,7 @@ Let's start with just running task:
|
|
|
194
200
|
* reuse-enable: Enable using SPDX reuse for enforcing copyright and license.
|
|
195
201
|
* reuse-lint: Perform reuse checks if pyproject.toml: tools.taskfile.reuse is set to "enabled"
|
|
196
202
|
* serve-docs: Start the documentation server and open browser at localhost:8000.
|
|
203
|
+
* switch-to-uv: Switch development to use uv.
|
|
197
204
|
* switch-to-hatch: Switch development to use hatch.
|
|
198
205
|
* switch-to-poetry: Switch development to use poetry.
|
|
199
206
|
* switch-to-setuptools: Switch development to use setuptools.
|
|
@@ -212,23 +219,28 @@ then let's just go for broke and:
|
|
|
212
219
|
|
|
213
220
|
Seriously, to start a new project:
|
|
214
221
|
|
|
215
|
-
1.
|
|
216
|
-
2.
|
|
217
|
-
3.
|
|
218
|
-
4.
|
|
219
|
-
5.
|
|
220
|
-
6.
|
|
222
|
+
1. cookiecutter https://github.com/royw/cookiecutter-clibones
|
|
223
|
+
2. cd {your-project-name}
|
|
224
|
+
3. task switch-to-uv
|
|
225
|
+
4. task init
|
|
226
|
+
5. task build
|
|
227
|
+
6. optionally: task switch-to-setuptools
|
|
228
|
+
7. ...
|
|
221
229
|
|
|
222
230
|
Now the make task is the main rinse and repeat task, i.e., make it, correct
|
|
223
231
|
errors, make it,...
|
|
224
232
|
|
|
225
233
|
But say I prefer hatch, it is easy to switch:
|
|
226
234
|
|
|
227
|
-
|
|
235
|
+
➤ task switch-to-hatch
|
|
236
|
+
|
|
237
|
+
or switch back to the default uv workflow with:
|
|
238
|
+
|
|
239
|
+
➤ task switch-to-uv
|
|
228
240
|
|
|
229
241
|
or maybe setuptools:
|
|
230
242
|
|
|
231
|
-
|
|
243
|
+
➤ task switch-to-setuptools
|
|
232
244
|
|
|
233
245
|
and to switch back to poetry with:
|
|
234
246
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: version_bumper
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: Python package version utility to bump a version by parts.
|
|
5
5
|
Project-URL: version_bumper, https://github.com/royw/version_bumper
|
|
6
6
|
Author-email: Roy Wright <roy@wright.org>
|
|
@@ -40,9 +40,10 @@ Requires-Dist: pre-commit<4.0.0,>=3.7.1; extra == 'dev'
|
|
|
40
40
|
Requires-Dist: pyupgrade<4.0.0,>=3.16.0; extra == 'dev'
|
|
41
41
|
Requires-Dist: reuse<4.0.0,>=3.0.2; extra == 'dev'
|
|
42
42
|
Requires-Dist: ruff<0.5.0,>=0.4.7; extra == 'dev'
|
|
43
|
+
Requires-Dist: setuptools<81.0.0,>=70.0.0; extra == 'dev'
|
|
43
44
|
Requires-Dist: shellcheck-py<0.11.0,>=0.10.0.1; extra == 'dev'
|
|
44
45
|
Requires-Dist: toml-cli<0.8.0,>=0.7.0; extra == 'dev'
|
|
45
|
-
Requires-Dist: twine<
|
|
46
|
+
Requires-Dist: twine<7.0.0,>=6.1.0; extra == 'dev'
|
|
46
47
|
Requires-Dist: validate-pyproject<0.19.0,>=0.18.0; extra == 'dev'
|
|
47
48
|
Provides-Extra: docs
|
|
48
49
|
Requires-Dist: mkdocs-material<10.0.0,>=9.5.0; extra == 'docs'
|
|
@@ -113,7 +114,6 @@ What this means is:
|
|
|
113
114
|
- `version_bumper` manages the version(s) in the
|
|
114
115
|
[pyproject.toml](https://packaging.python.org/en/latest/specifications/pyproject-toml/#pyproject-toml-spec)
|
|
115
116
|
file.
|
|
116
|
-
|
|
117
117
|
- Poetry uses the key/value pair `tool.poetry.version` (expecting this to
|
|
118
118
|
change when version 2 is released)
|
|
119
119
|
- other tools use the current PyPA standard key/value pair `project.version`
|
|
@@ -234,29 +234,32 @@ Please see the unit tests in tests/ directory for more examples.
|
|
|
234
234
|
#### Development Prerequisites
|
|
235
235
|
|
|
236
236
|
- Install the task manager: [Task](https://taskfile.dev/)
|
|
237
|
-
- Optionally install
|
|
238
|
-
|
|
239
|
-
|
|
237
|
+
- Optionally install
|
|
238
|
+
[pyenv-installer](https://github.com/pyenv/pyenv-installer)
|
|
239
|
+
- Install dependent pythons, example:
|
|
240
240
|
|
|
241
|
-
|
|
241
|
+
`pyenv local 3.11.9 3.12.3`
|
|
242
242
|
|
|
243
243
|
_Note you may need to install some libraries for the pythons to compile
|
|
244
244
|
cleanly._ _For example on ubuntu (note I prefer `nala` over `apt`):_
|
|
245
245
|
|
|
246
|
-
|
|
246
|
+
`sudo nala install tk-dev libbz2-dev libreadline-dev libsqlite3-dev lzma-dev python3-tk libreadline-dev`
|
|
247
247
|
|
|
248
|
-
-
|
|
249
|
-
- Optionally install [Poetry](https://python-poetry.org/)
|
|
250
|
-
- Optionally install [Hatch](https://hatch.pypa.io/)
|
|
251
|
-
- Optionally install [setuptools](https://setuptools.pypa.io/)
|
|
252
|
-
|
|
248
|
+
- Install [uv](https://docs.astral.sh/uv/)
|
|
249
|
+
- Optionally install [Poetry](https://python-poetry.org/)
|
|
250
|
+
- Optionally install [Hatch](https://hatch.pypa.io/)
|
|
251
|
+
- Optionally install [setuptools](https://setuptools.pypa.io/)
|
|
252
|
+
- Install [build](https://build.pypa.io/)
|
|
253
253
|
|
|
254
|
-
Install the package using
|
|
254
|
+
Install the package using the default `uv` workflow. Example:
|
|
255
|
+
- `git clone git@github.com:royw/version_bumper.git`
|
|
256
|
+
- `cd version_bumper`
|
|
257
|
+
- `task switch-to-uv`
|
|
258
|
+
- `task init`
|
|
259
|
+
- `task make`
|
|
255
260
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
- `task init`
|
|
259
|
-
- `task make`
|
|
261
|
+
You can still switch to `poetry`, `hatch`, or `setuptools` later with the
|
|
262
|
+
corresponding `task switch-to-*` command.
|
|
260
263
|
|
|
261
264
|
_Note, `task init` will run `git init .`, `git add` the initial project files,
|
|
262
265
|
and do a `git commit`. If you are using another VCS, please first edit the init
|
|
@@ -275,6 +278,7 @@ development environment.
|
|
|
275
278
|
- The [Python Packaging User Guide](https://packaging.python.org/en/latest)
|
|
276
279
|
- The
|
|
277
280
|
[pyproject.toml specification](https://pypi.python.org/pypi/pyproject.toml)
|
|
281
|
+
- [uv documentation](https://docs.astral.sh/uv/)
|
|
278
282
|
- The [Poetry pyproject.toml metadata](https://python-poetry.org/docs/pyproject)
|
|
279
283
|
- [pip documentation](https://pip.pypa.io/en/stable/)
|
|
280
284
|
- [Setuptools](https://setuptools.pypa.io/)
|
|
@@ -46,7 +46,6 @@ What this means is:
|
|
|
46
46
|
- `version_bumper` manages the version(s) in the
|
|
47
47
|
[pyproject.toml](https://packaging.python.org/en/latest/specifications/pyproject-toml/#pyproject-toml-spec)
|
|
48
48
|
file.
|
|
49
|
-
|
|
50
49
|
- Poetry uses the key/value pair `tool.poetry.version` (expecting this to
|
|
51
50
|
change when version 2 is released)
|
|
52
51
|
- other tools use the current PyPA standard key/value pair `project.version`
|
|
@@ -167,29 +166,32 @@ Please see the unit tests in tests/ directory for more examples.
|
|
|
167
166
|
#### Development Prerequisites
|
|
168
167
|
|
|
169
168
|
- Install the task manager: [Task](https://taskfile.dev/)
|
|
170
|
-
- Optionally install
|
|
171
|
-
|
|
172
|
-
|
|
169
|
+
- Optionally install
|
|
170
|
+
[pyenv-installer](https://github.com/pyenv/pyenv-installer)
|
|
171
|
+
- Install dependent pythons, example:
|
|
173
172
|
|
|
174
|
-
|
|
173
|
+
`pyenv local 3.11.9 3.12.3`
|
|
175
174
|
|
|
176
175
|
_Note you may need to install some libraries for the pythons to compile
|
|
177
176
|
cleanly._ _For example on ubuntu (note I prefer `nala` over `apt`):_
|
|
178
177
|
|
|
179
|
-
|
|
178
|
+
`sudo nala install tk-dev libbz2-dev libreadline-dev libsqlite3-dev lzma-dev python3-tk libreadline-dev`
|
|
180
179
|
|
|
181
|
-
-
|
|
182
|
-
- Optionally install [Poetry](https://python-poetry.org/)
|
|
183
|
-
- Optionally install [Hatch](https://hatch.pypa.io/)
|
|
184
|
-
- Optionally install [setuptools](https://setuptools.pypa.io/)
|
|
185
|
-
|
|
180
|
+
- Install [uv](https://docs.astral.sh/uv/)
|
|
181
|
+
- Optionally install [Poetry](https://python-poetry.org/)
|
|
182
|
+
- Optionally install [Hatch](https://hatch.pypa.io/)
|
|
183
|
+
- Optionally install [setuptools](https://setuptools.pypa.io/)
|
|
184
|
+
- Install [build](https://build.pypa.io/)
|
|
186
185
|
|
|
187
|
-
Install the package using
|
|
186
|
+
Install the package using the default `uv` workflow. Example:
|
|
187
|
+
- `git clone git@github.com:royw/version_bumper.git`
|
|
188
|
+
- `cd version_bumper`
|
|
189
|
+
- `task switch-to-uv`
|
|
190
|
+
- `task init`
|
|
191
|
+
- `task make`
|
|
188
192
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
- `task init`
|
|
192
|
-
- `task make`
|
|
193
|
+
You can still switch to `poetry`, `hatch`, or `setuptools` later with the
|
|
194
|
+
corresponding `task switch-to-*` command.
|
|
193
195
|
|
|
194
196
|
_Note, `task init` will run `git init .`, `git add` the initial project files,
|
|
195
197
|
and do a `git commit`. If you are using another VCS, please first edit the init
|
|
@@ -208,6 +210,7 @@ development environment.
|
|
|
208
210
|
- The [Python Packaging User Guide](https://packaging.python.org/en/latest)
|
|
209
211
|
- The
|
|
210
212
|
[pyproject.toml specification](https://pypi.python.org/pypi/pyproject.toml)
|
|
213
|
+
- [uv documentation](https://docs.astral.sh/uv/)
|
|
211
214
|
- The [Poetry pyproject.toml metadata](https://python-poetry.org/docs/pyproject)
|
|
212
215
|
- [pip documentation](https://pip.pypa.io/en/stable/)
|
|
213
216
|
- [Setuptools](https://setuptools.pypa.io/)
|
|
@@ -8,6 +8,7 @@ includes:
|
|
|
8
8
|
# "fe" stands for "front end"
|
|
9
9
|
fe: taskfiles/front-end.yaml
|
|
10
10
|
hatch: taskfiles/hatch.yaml
|
|
11
|
+
uv: taskfiles/uv.yaml
|
|
11
12
|
poetry: taskfiles/poetry.yaml
|
|
12
13
|
setuptools: taskfiles/setuptools.yaml
|
|
13
14
|
variables: taskfiles/front-end-vars.yaml
|
|
@@ -35,7 +36,7 @@ tasks:
|
|
|
35
36
|
- git add docs LICENSES scripts src tests .gitignore
|
|
36
37
|
.pre-commit-config.yaml DEV-README.md mkdocs.yml pyproject.toml
|
|
37
38
|
README.md Taskfile.yaml taskfiles/hatch.yaml taskfiles/poetry.yaml
|
|
38
|
-
tox.ini
|
|
39
|
+
taskfiles/uv.yaml taskfiles/uv-vars.yaml tox.ini
|
|
39
40
|
# Realizing the template can mess up formatting of the files
|
|
40
41
|
- pre-commit run blacken-docs --all-files >/dev/null || true
|
|
41
42
|
- pre-commit run trailing-whitespace --all-files >/dev/null || true
|
|
@@ -277,7 +278,8 @@ tasks:
|
|
|
277
278
|
clean:
|
|
278
279
|
desc: Remove virtual environments and generated files.
|
|
279
280
|
cmds:
|
|
280
|
-
- pre-commit clean
|
|
281
|
+
- sh -c 'if command -v pre-commit >/dev/null 2>&1; then pre-commit clean
|
|
282
|
+
|| true; fi'
|
|
281
283
|
- task: fe:env-prune
|
|
282
284
|
- rm -rf .tox
|
|
283
285
|
- rm -rf .nox
|
|
@@ -302,6 +304,17 @@ tasks:
|
|
|
302
304
|
cmds:
|
|
303
305
|
- source .venv/bin/deactivate 2>/dev/null || true
|
|
304
306
|
|
|
307
|
+
switch-to-uv:
|
|
308
|
+
desc: Switch development to use uv.
|
|
309
|
+
cmds:
|
|
310
|
+
- task: clean
|
|
311
|
+
- rm -f taskfiles/front-end.yaml taskfiles/front-end-vars.yaml
|
|
312
|
+
- ln -s uv.yaml taskfiles/front-end.yaml
|
|
313
|
+
- ln -s uv-vars.yaml taskfiles/front-end-vars.yaml
|
|
314
|
+
- task: uv:make-env
|
|
315
|
+
- task: uv:update-env
|
|
316
|
+
- task: uv:show-env
|
|
317
|
+
|
|
305
318
|
switch-to-hatch:
|
|
306
319
|
desc: Switch development to use hatch.
|
|
307
320
|
cmds:
|
|
@@ -97,7 +97,6 @@ The `Settings` does have a few extra features including:
|
|
|
97
97
|
|
|
98
98
|
- Install the task manager: [Task](https://taskfile.dev/)
|
|
99
99
|
- Optionally install [pyenv-installer](https://github.com/pyenv/pyenv-installer)
|
|
100
|
-
|
|
101
100
|
- Install dependent pythons, example:
|
|
102
101
|
|
|
103
102
|
`pyenv local 3.11.9 3.12.3`
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# ref: https://packaging.python.org/en/latest/specifications/pyproject-toml
|
|
6
6
|
|
|
7
7
|
[build-system]
|
|
8
|
-
# defaults to using Hatch.
|
|
8
|
+
# defaults to using Hatch as the build backend and uv as the development frontend.
|
|
9
9
|
# Run "task switch-to-poetry" or "task switch-to-setuptools" to change as
|
|
10
10
|
# taskfiles/front-end*.yaml symbolic links need to be kept in sync with
|
|
11
11
|
# these values.
|
|
@@ -21,7 +21,7 @@ name = "version_bumper"
|
|
|
21
21
|
# TOML type: string
|
|
22
22
|
# The version of the project, as defined in the Version specifier specification.
|
|
23
23
|
# Users SHOULD prefer to specify already-normalized versions
|
|
24
|
-
version = "0.1.
|
|
24
|
+
version = "0.1.3"
|
|
25
25
|
|
|
26
26
|
# TOML type: string
|
|
27
27
|
# The summary description of the project in one line. Tools MAY error if this includes multiple lines.
|
|
@@ -144,9 +144,10 @@ dev = [
|
|
|
144
144
|
"pyupgrade<4.0.0,>=3.16.0",
|
|
145
145
|
"reuse<4.0.0,>=3.0.2",
|
|
146
146
|
"ruff>=0.4.7,<0.5.0",
|
|
147
|
+
"setuptools>=70.0.0,<81.0.0",
|
|
147
148
|
"shellcheck-py<0.11.0,>=0.10.0.1",
|
|
148
149
|
"toml-cli<0.8.0,>=0.7.0",
|
|
149
|
-
"twine<
|
|
150
|
+
"twine<7.0.0,>=6.1.0",
|
|
150
151
|
"validate-pyproject>=0.18.0,<0.19.0",
|
|
151
152
|
"check-pyproject>=0.1.0,<0.2.0",
|
|
152
153
|
]
|
|
@@ -171,9 +172,12 @@ sphinx = [
|
|
|
171
172
|
"myst-parser<4.0.0,>=3.0.1",
|
|
172
173
|
"sphinx<8.0.0,>=7.3.7",
|
|
173
174
|
"sphinx-autodoc-typehints<3.0.0,>=2.1.1",
|
|
174
|
-
"
|
|
175
|
+
"sphinx-copybutton>=0.5.2,<0.6.0",
|
|
175
176
|
]
|
|
176
177
|
|
|
178
|
+
[tool.uv]
|
|
179
|
+
package = true
|
|
180
|
+
|
|
177
181
|
### liccheck check that dependency licenses are acceptable
|
|
178
182
|
|
|
179
183
|
[tool.liccheck]
|
|
@@ -508,7 +512,7 @@ name = "version_bumper"
|
|
|
508
512
|
|
|
509
513
|
# The version of the package. Required in package mode
|
|
510
514
|
# This should be a valid PEP 440 string.
|
|
511
|
-
version = "0.1.
|
|
515
|
+
version = "0.1.3"
|
|
512
516
|
|
|
513
517
|
# A short description of the package. Required in package mode
|
|
514
518
|
description = "Python package version utility to bump a version by parts."
|
|
@@ -606,13 +610,14 @@ pre-commit = "^3.7.1"
|
|
|
606
610
|
pyupgrade = "^3.16.0"
|
|
607
611
|
reuse = "^3.0.2"
|
|
608
612
|
ruff = "^0.4.7"
|
|
613
|
+
setuptools = ">=70.0.0,<81.0.0"
|
|
609
614
|
shellcheck-py = "^0.10.0.1"
|
|
610
615
|
toml-cli = "^0.7.0"
|
|
611
616
|
validate-pyproject = "^0.18"
|
|
612
617
|
httpx = "^0.27.0"
|
|
613
618
|
pip-tools = "^7.4.1"
|
|
614
619
|
check-pyproject = "^0.1.0"
|
|
615
|
-
twine = "^
|
|
620
|
+
twine = "^6.1.0"
|
|
616
621
|
|
|
617
622
|
[tool.poetry.group.test.dependencies]
|
|
618
623
|
coverage = {extras = ["toml"], version = "^7.5.4"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# SPDX-FileCopyrightText: 2024 Roy Wright
|
|
2
2
|
# SPDX-FileCopyrightText: 2025 Roy Wright
|
|
3
|
+
# SPDX-FileCopyrightText: 2026 Roy Wright
|
|
3
4
|
#
|
|
4
5
|
# SPDX-License-Identifier: MIT
|
|
5
6
|
|
|
@@ -55,7 +56,7 @@ class PyProject:
|
|
|
55
56
|
with tempfile.NamedTemporaryFile("wt", dir=pyproject_toml_path.parent, delete=False) as tf:
|
|
56
57
|
tf.write(tomlkit.dumps(doc))
|
|
57
58
|
temp_name = Path(tf.name)
|
|
58
|
-
temp_name.
|
|
59
|
+
temp_name.replace(pyproject_toml_path)
|
|
59
60
|
except FileNotFoundError as ex:
|
|
60
61
|
errmsg = f'Unable to open "{pyproject_toml_path}" for saving - File not found.'
|
|
61
62
|
raise FileNotFoundError(errmsg) from ex
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2024 Roy Wright
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
5
|
+
version: "3"
|
|
6
|
+
|
|
7
|
+
vars:
|
|
8
|
+
# Global variables are realized on file load, so cannot assume virtual environment is available.
|
|
9
|
+
# If you need the virtual environment to calculate a variable, use the vars section of the task
|
|
10
|
+
# that needs the variable.
|
|
11
|
+
DEFAULT_RUNNER: "{{.UV_RUNNER}}"
|
|
12
|
+
DEV_RUNNER: "{{.UV_DEV_RUNNER}}"
|
|
13
|
+
DOCS_RUNNER: "{{.UV_DOCS_RUNNER}}"
|
|
14
|
+
TEST_RUNNER: "{{.UV_TEST_RUNNER}}"
|
|
15
|
+
METRICS_RUNNER: "{{.UV_METRICS_RUNNER}}"
|
|
16
|
+
SPHINX_RUNNER: "{{.UV_SPHINX_RUNNER}}"
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2024 Roy Wright
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
5
|
+
version: "3"
|
|
6
|
+
|
|
7
|
+
vars:
|
|
8
|
+
UV_RUNNER: uv run --
|
|
9
|
+
UV_DEV_RUNNER: uv run --
|
|
10
|
+
UV_DOCS_RUNNER: uv run --
|
|
11
|
+
UV_TEST_RUNNER: uv run --
|
|
12
|
+
UV_METRICS_RUNNER: uv run --
|
|
13
|
+
UV_SPHINX_RUNNER: uv run --
|
|
14
|
+
|
|
15
|
+
tasks:
|
|
16
|
+
build:
|
|
17
|
+
# [private] build dist packages
|
|
18
|
+
cmds:
|
|
19
|
+
- uv build
|
|
20
|
+
|
|
21
|
+
env-prune:
|
|
22
|
+
# [private] remove development environment (i.e. virtual environments)
|
|
23
|
+
cmds:
|
|
24
|
+
- rm -rf .venv uv.lock
|
|
25
|
+
|
|
26
|
+
make-env:
|
|
27
|
+
# [private] create virtual environment
|
|
28
|
+
cmds:
|
|
29
|
+
- uv venv --clear .venv
|
|
30
|
+
|
|
31
|
+
show-env:
|
|
32
|
+
# [private] show env using uv
|
|
33
|
+
cmds:
|
|
34
|
+
- echo "Creating virtualenv in .venv"
|
|
35
|
+
- uv python list
|
|
36
|
+
- uv run -- python --version
|
|
37
|
+
|
|
38
|
+
unit-test:
|
|
39
|
+
# [private] Run the unit tests for the supported versions of python.
|
|
40
|
+
cmds:
|
|
41
|
+
- uv run -- pytest tests
|
|
42
|
+
- uv run -- tox
|
|
43
|
+
|
|
44
|
+
update-env:
|
|
45
|
+
# [private] Update virtual environment
|
|
46
|
+
cmds:
|
|
47
|
+
- task: make-env
|
|
48
|
+
- uv sync --extra dev --extra test --extra docs --extra metrics --extra
|
|
49
|
+
sphinx
|
|
50
|
+
|
|
51
|
+
lockfiles-enable:
|
|
52
|
+
# Enable backend to use requirements.txt files managed by pip-compile as lock files.
|
|
53
|
+
cmds:
|
|
54
|
+
- echo "Not implemented"
|
|
55
|
+
|
|
56
|
+
lockfiles-disable:
|
|
57
|
+
# [private] Disable backend to use requirements.txt files managed by pip-compile as lock files.
|
|
58
|
+
cmds:
|
|
59
|
+
- echo "Not implemented"
|
|
60
|
+
|
|
61
|
+
publish-test-pypi:
|
|
62
|
+
# [private] Publish to the test.pypi.org server.
|
|
63
|
+
cmds:
|
|
64
|
+
- echo "Not Implemented"
|
|
65
|
+
|
|
66
|
+
publish-pypi:
|
|
67
|
+
# [private] Publish to the pypi.org server.
|
|
68
|
+
cmds:
|
|
69
|
+
- echo "Not Implemented"
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
7
|
-
import random
|
|
8
7
|
import tempfile
|
|
9
8
|
from pathlib import Path
|
|
10
9
|
|
|
@@ -45,10 +44,9 @@ def test_invalid_config_file_load() -> None:
|
|
|
45
44
|
for extension in config_file.supported_extensions:
|
|
46
45
|
with tempfile.TemporaryDirectory() as tmp:
|
|
47
46
|
filepath = Path(tmp) / f"test_data{extension}"
|
|
48
|
-
with filepath.open("w") as out_fp
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
out_fp.write(f"{random.choice(words)} ")
|
|
47
|
+
with filepath.open("w") as out_fp:
|
|
48
|
+
for index in range(256):
|
|
49
|
+
out_fp.write(f"invalid_token_{index} ")
|
|
52
50
|
|
|
53
51
|
with pytest.raises(ValueError): # NOQA: PT011
|
|
54
52
|
config_file.load(filepath=filepath)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{version_bumper-0.1.2 → version_bumper-0.1.3}/.idea/inspectionProfiles/profiles_settings.xml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{version_bumper-0.1.2 → version_bumper-0.1.3}/src/version_bumper/clibones/application_settings.py
RENAMED
|
File without changes
|
|
File without changes
|
{version_bumper-0.1.2 → version_bumper-0.1.3}/src/version_bumper/clibones/config_file_base.py
RENAMED
|
File without changes
|
|
File without changes
|
{version_bumper-0.1.2 → version_bumper-0.1.3}/src/version_bumper/clibones/json_config_file.py
RENAMED
|
File without changes
|
|
File without changes
|
{version_bumper-0.1.2 → version_bumper-0.1.3}/src/version_bumper/clibones/toml_config_file.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|