Skip to content

Commit 1690ea2

Browse files
Merge pull request #122 from isteinbrecher/version
Add version by git tag
2 parents f13941d + 868d850 commit 1690ea2

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ test.py
2121

2222
# .github should not be ignored
2323
!.github
24+
25+
# Version file
26+
src/cubitpy/version.py

pyproject.toml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["setuptools"]
2+
requires = ["setuptools", "setuptools_scm[toml]"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
@@ -16,7 +16,13 @@ dependencies = [
1616
"numpy",
1717
"fourcipp"
1818
]
19-
version = "0.1.1"
19+
20+
dynamic = ["version"]
21+
22+
[tool.setuptools_scm]
23+
version_file = "src/cubitpy/version.py"
24+
version_scheme = "post-release"
25+
local_scheme = "no-local-version"
2026

2127
[project.urls]
2228
Repository = "https://github.com/imcs-compsim/cubitpy/"
@@ -30,6 +36,11 @@ dev = [
3036
"deepdiff",
3137
]
3238

39+
[tool.coverage.run]
40+
omit = [
41+
"src/cubitpy/version.py",
42+
]
43+
3344
[tool.pytest.ini_options]
3445
testpaths = ["tests"]
3546
addopts = "-p pytest_cov --cov-report=term --cov-report=html --cov=src/ --cov-config=.coveragerc"

0 commit comments

Comments
 (0)