Skip to content

Commit

Permalink
Move version (#42)
Browse files Browse the repository at this point in the history
* move version

* remove __version__ import from conf.py

---------

Co-authored-by: tommyod <tommy.odland>
  • Loading branch information
tommyod authored Sep 2, 2024
1 parent 1184823 commit d2c4dfe
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,18 @@

# 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
# |version| and |release|, also used in various other places throughout the
# built documents.
#

from streprogen import __version__

from importlib.metadata import version

__version__ = version("streprogen")

# The short X.Y version.
version = __version__
Expand Down
8 changes: 3 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]"},
Expand Down Expand Up @@ -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"}

Expand Down
2 changes: 0 additions & 2 deletions streprogen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit d2c4dfe

Please sign in to comment.