Skip to content

Commit a61b714

Browse files
author
Richard Liang
committed
Continuing to get my ducks in a row for packaging.
1 parent 1cc48db commit a61b714

File tree

4 files changed

+89
-5
lines changed

4 files changed

+89
-5
lines changed

pyproject.toml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["hatchling"]
2+
requires = ["hatchling", "uv-dynamic-versioning"]
33
build-backend = "hatchling.build"
44

55
[project]
@@ -35,6 +35,7 @@ dependencies = [
3535
"typer>=0.15.2",
3636
"types-pyyaml>=6.0.12.20250516",
3737
"types-requests>=2.32.4.20250611",
38+
"uv-dynamic-versioning>=0.8.2",
3839
]
3940

4041
[dependency-groups]
@@ -74,7 +75,7 @@ database = [
7475
]
7576

7677
[tool.hatch.version]
77-
path = "src/easyhla/__about__.py"
78+
source = "uv-dynamic-versioning"
7879

7980
[tool.hatch.build]
8081
include = [
@@ -102,9 +103,20 @@ directory = "output"
102103
[tool.hatch.build.targets.wheel]
103104
packages = ["src/easyhla"]
104105

106+
[tool.hatch.build.hooks.version]
107+
path = "src/easyhla/_version.py"
108+
template = '''
109+
__version__ = "{version}"
110+
'''
111+
105112
[tool.uv]
106113
package = true
107114

115+
[tool.uv-dynamic-versioning]
116+
vcs = "git"
117+
style = "semver"
118+
fallback-version = "0.0.0"
119+
108120
[tool.pytest.ini_options]
109121
pythonpath = "src"
110122
minversion = "6.0"

src/easyhla/__about__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from easyhla.utils import bin2nuc, nuc2bin
55

66

7-
def make_comparison(easyhla: EasyHLA, ref_seq: str, test_seq: str) -> str:
7+
def make_comparison(ref_seq: str, test_seq: str) -> str:
88
"""
99
Compares two sequences for differences
1010
@@ -75,7 +75,7 @@ def compare_ref_vs_test(
7575
"INTRON",
7676
"EXON3",
7777
]:
78-
comparison = make_comparison(easyhla, _ref, _test)
78+
comparison = make_comparison(_ref, _test)
7979
if "_" in comparison:
8080
print(
8181
">>>",

uv.lock

Lines changed: 73 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)