Skip to content

Commit

Permalink
chore: use svn versioning (#83)
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <[email protected]>

Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii authored Jan 4, 2023
1 parent 2698ef9 commit 842220d
Show file tree
Hide file tree
Showing 8 changed files with 383 additions and 360 deletions.
4 changes: 4 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git_archival.txt export-subst
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-python@v4
with:
Expand All @@ -53,6 +55,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: conda-incubator/setup-miniconda@v2
with:
Expand All @@ -74,6 +78,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Build sdist and wheel
run: pipx run build
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,6 @@ dmypy.json
cython_debug/

.pdm.toml

# Version file
_version.py
715 changes: 358 additions & 357 deletions pdm.lock

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[build-system]
requires = ["hatchling"]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[project]
name = "uhi"
version = "0.3.2"
description = "Unified Histogram Interface: tools to help library authors work with histograms"
authors = [
{name="Henry Schreiner", email="[email protected]"},
Expand Down Expand Up @@ -36,6 +35,7 @@ classifiers = [
"Topic :: Scientific/Engineering",
"Typing :: Typed",
]
dynamic = ["version"]

[project.urls]
Homepage = "https://github.com/Scikit-HEP/uhi"
Expand All @@ -56,6 +56,10 @@ test = [
]


[tool.hatch]
version.source = "vcs"
build.hooks.vcs.version-file = "src/uhi/_version.py"

[tool.pdm.dev-dependencies]
dev = [
"pytest>=6",
Expand Down
4 changes: 3 additions & 1 deletion src/uhi/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
__version__ = "0.3.2"
from ._version import version as __version__

__all__ = ["__version__"]
2 changes: 2 additions & 0 deletions src/uhi/_version.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
version: str
version_tuple: tuple[int, int, int] | tuple[int, int, int, str, str]

0 comments on commit 842220d

Please sign in to comment.