Skip to content

Commit

Permalink
use pdm backend for version retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
observingClouds committed Sep 23, 2024
1 parent fa74d07 commit ed17b9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dependencies = [
"numpy",
"omegaconf",
"pandas",
"pdm-backend",
"Pint",
"Pint-Pandas",
"pint-xarray",
Expand Down Expand Up @@ -66,8 +67,6 @@ build-backend = "pdm.backend"

[tool.pdm.version]
source = "scm"
write_to = "pysonde/__init__.py"
write_template = "__version__ = \"{}\""

[tool.pdm]
distribution = true
Expand All @@ -80,7 +79,6 @@ ignore_missing_imports = true

[tool.ruff]
line-length = 88
extend-exclude = ["pysonde/__init__.py"]

[tool.ruff.lint.mccabe]
max-complexity = 18
Expand Down
4 changes: 3 additions & 1 deletion pysonde/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
__version__ = "0.0.6"
from pdm.backend.hooks.version import get_version_from_scm

__version__ = str(get_version_from_scm(".").version)

0 comments on commit ed17b9b

Please sign in to comment.