Skip to content

Commit

Permalink
use dynamic versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
dswah committed Feb 8, 2024
1 parent 620958f commit c31b296
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
8 changes: 4 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion pygam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""

from __future__ import absolute_import
from importlib.metadata import version, PackageNotFoundError

from pygam.pygam import GAM
from pygam.pygam import LinearGAM
Expand Down Expand Up @@ -33,4 +34,10 @@
'intercept',
]

__version__ = '0.8.0'

__version__ = "0.0.0" # placeholder for dynamic versioning
try:
__version__ = version("pygam")
except PackageNotFoundError:
# package is not installed
pass
14 changes: 11 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pygam"
version = "0.9.0"
version = "0.0.0" # placeholder for dynamic versioning
description = ""
authors = ["Daniel Servén Marín", "Charlie Brummitt"]
license = "Apache-2.0"
Expand Down Expand Up @@ -46,5 +46,13 @@ exclude = '''
'''

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
build-backend = "poetry_dynamic_versioning.backend"

[tool.poetry.scripts]
zieb-python = "zieb_python.cli:cli"

[tool.poetry-dynamic-versioning]
enable = true
vcs = "git"
style = "semver"

0 comments on commit c31b296

Please sign in to comment.