Skip to content

Commit 093f945

Browse files
committed
Get version from git tag
1 parent b29c97d commit 093f945

File tree

4 files changed

+49
-1
lines changed

4 files changed

+49
-1
lines changed

binder/environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ dependencies:
55
- click =8.1.8
66
- pydantic =2.12.4
77
- hatchling =1.27.0
8+
- hatch-vcs =0.5.0
89
- httpcore =1.0.7
910
- jobflow =0.2.1
1011
- pyiron_base =0.15.10

pyproject.toml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "python_workflow_definition"
7-
version = "0.1.2"
87
description = "Python Workflow Definition - workflow interoperability for aiida, jobflow and pyiron"
98
authors = [
109
{ name = "Jan Janssen", email = "janssen@mpie.de" },
@@ -19,6 +18,7 @@ dependencies = [
1918
"numpy>=1.21",
2019
"pydantic>=2.7.0,<=2.12.4",
2120
]
21+
dynamic = ["version"]
2222

2323
[project.optional-dependencies]
2424
aiida = [
@@ -35,3 +35,25 @@ plot = [
3535
"networkx>=2.8.8,<=3.5",
3636
"ipython>=7.33.0,<=9.8.0",
3737
]
38+
39+
[tool.hatch.build]
40+
include = [
41+
"src/python_workflow_definition"
42+
]
43+
44+
[tool.hatch.build.hooks.vcs]
45+
version-file = "src/python_workflow_definition/_version.py"
46+
47+
[tool.hatch.build.targets.sdist]
48+
include = [
49+
"src/python_workflow_definition"
50+
]
51+
52+
[tool.hatch.build.targets.wheel]
53+
packages = [
54+
"src/python_workflow_definition"
55+
]
56+
57+
[tool.hatch.version]
58+
source = "vcs"
59+
path = "src/python_workflow_definition/_version.py"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import python_workflow_definition._version
2+
3+
4+
__version__ = python_workflow_definition._version.__version__
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# file generated by setuptools-scm
2+
# don't change, don't track in version control
3+
4+
__all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
5+
6+
TYPE_CHECKING = False
7+
if TYPE_CHECKING:
8+
from typing import Tuple
9+
from typing import Union
10+
11+
VERSION_TUPLE = Tuple[Union[int, str], ...]
12+
else:
13+
VERSION_TUPLE = object
14+
15+
version: str
16+
__version__: str
17+
__version_tuple__: VERSION_TUPLE
18+
version_tuple: VERSION_TUPLE
19+
20+
__version__ = version = "0.0.1"
21+
__version_tuple__ = version_tuple = (0, 0, 1)

0 commit comments

Comments
 (0)