diff --git a/poetry.lock b/poetry.lock index 36cbadea..268fb26a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.4.0 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand. [[package]] name = "alabaster" @@ -367,14 +367,14 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""} [[package]] name = "codecov" -version = "2.1.12" +version = "2.1.13" description = "Hosted coverage reports for GitHub, Bitbucket and Gitlab" category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ - {file = "codecov-2.1.12-py2.py3-none-any.whl", hash = "sha256:585dc217dc3d8185198ceb402f85d5cb5dbfa0c5f350a5abcdf9e347776a5b47"}, - {file = "codecov-2.1.12.tar.gz", hash = "sha256:a0da46bb5025426da895af90938def8ee12d37fcbcbbbc15b6dc64cf7ebc51c1"}, + {file = "codecov-2.1.13-py2.py3-none-any.whl", hash = "sha256:c2ca5e51bba9ebb43644c43d0690148a55086f7f5e6fd36170858fa4206744d5"}, + {file = "codecov-2.1.13.tar.gz", hash = "sha256:2362b685633caeaf45b9951a9b76ce359cd3581dd515b430c6c3f5dfb4d92a8c"}, ] [package.dependencies] diff --git a/pygam/__init__.py b/pygam/__init__.py index 74dba53a..311478d1 100644 --- a/pygam/__init__.py +++ b/pygam/__init__.py @@ -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 @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 22066e11..15fda376 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" @@ -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"