diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c4f6f93..fd869ad 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,7 @@ jobs: sudo apt-get install pandoc -y pip install pip jupyter matplotlib pytest black wheel setuptools twine flake8 --quiet --upgrade pip install . # Install the package - black . --check -l 120 --exclude="_version.py" + black . --check -l 120 flake8 streprogen --select=F811,F841,F401,E711,E712,E731 pytest streprogen --doctest-modules --color=yes # Run tests pytest docs/examples --verbose --doctest-modules --color=yes # Run test_notebooks.py diff --git a/docs/conf.py b/docs/conf.py index 034a1bb..af6fdd9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -57,7 +57,7 @@ # General information about the project. project = "streprogen" -copyright = "2017-2019, Tommy O." +copyright = "2017-2014, Tommy O." author = "Tommy O." # The version info for the project you're documenting, acts as replacement for @@ -65,7 +65,10 @@ # built documents. # -from streprogen import __version__ + +from importlib.metadata import version + +__version__ = version("streprogen") # The short X.Y version. version = __version__ diff --git a/pyproject.toml b/pyproject.toml index 78e0499..cb31106 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,11 @@ [build-system] -requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"] +requires = ["setuptools>=45"] build-backend = "setuptools.build_meta" [project] name = "streprogen" -dynamic = ["version", "readme"] +version = "4.0.2" +dynamic = ["readme"] description = "The Python strength program generator." authors = [ {name = "Tommy Odland", email = "tommy.odland@gmail.com"}, @@ -32,9 +33,6 @@ dependencies = [ Homepage = "https://github.com/tommyod/streprogen" Repository = "https://github.com/tommyod/streprogen.git" -[tool.setuptools_scm] -write_to = "streprogen/_version.py" - [tool.setuptools.dynamic] readme = {file = ["README.rst"], content-type = "text/x-rst"} diff --git a/streprogen/__init__.py b/streprogen/__init__.py index bf1d325..235d4a6 100644 --- a/streprogen/__init__.py +++ b/streprogen/__init__.py @@ -18,8 +18,6 @@ from streprogen.program import Program from streprogen.sampling import sample_markov_ladder, sample_markov_loop -__version__ = "4.0.1" - __all__ = [ "StaticExercise", "DynamicExercise",