You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Write the version into the `pyproject.toml` file and that's it.
9
+
10
+
[project]
11
+
name = "Pac"
12
+
version = "1.0.0"
13
+
14
+
This version will be used when creating a release or source dist with uv.
15
+
16
+
### Dynamic versioning
17
+
18
+
Use a Python file that contains the version number. The build tool will use the `__version__` variable from the referenced file:
19
+
20
+
[project]
21
+
name = "Pac"
22
+
dynamic = ["version"]
23
+
24
+
[tool.hatch.version]
25
+
path = "pac/__about__.py"
26
+
27
+
### Semantic Versioning
28
+
29
+
Semantic Versioning adds meaning to a version with three numbers like 3.12.7 (`MAJOR.MINOR.PATCH`). You can use the number to identify incompatible versions. See [semver.org/](https://semver.org/)
30
+
31
+
The [hatch-semver](https://github.com/fleetingbytes/hatch-semver) tool helps maintaining semantic versions.
32
+
33
+
### Git Tag
34
+
The command `git tag` allows you to label commits in your version history with a specific version number, e.g.:
35
+
36
+
git tag 1.2.3
37
+
38
+
Inspect your tags with
39
+
40
+
git tag
41
+
42
+
or
43
+
44
+
git log
45
+
46
+
To integrate Git Tags in your versioning, you may want to use [hatch-vcs](https://github.com/ofek/hatch-vcs).
47
+
48
+
### bump-my-version
49
+
50
+
When using an automatic build system, you may want to count up your version number automatically.
51
+
One tool for that purpose is bump-my-version [github.com/callowayproject/bump-my-version](https://github.com/callowayproject/bump-my-version).
52
+
53
+
### Versioning Data with DVC
54
+
55
+
see [www.python4data.science/en/latest/productive/dvc/index.html](https://www.python4data.science/en/latest/productive/dvc/index.html)
56
+
57
+
----
58
+
59
+
Summarized from [https://python-basics-tutorial.readthedocs.io/en/latest/packs/distribution.html](https://python-basics-tutorial.readthedocs.io/en/latest/packs/distribution.html) by Veit Schiele.
0 commit comments