Skip to content

Commit

Permalink
Merge pull request #83 from punch-mission/fix-docs-version
Browse files Browse the repository at this point in the history
Fix package version in docs
  • Loading branch information
jmbhughes authored Nov 1, 2024
2 parents f8a576c + af8b030 commit 5a084f7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 0 additions & 4 deletions docs/requirements.txt

This file was deleted.

7 changes: 6 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# ruff: noqa
from importlib.metadata import version as get_version
from packaging.version import Version

# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
Expand All @@ -25,7 +27,10 @@

# The full version, including alpha/beta/rc tags
release: str = get_version("simpunch")

version: str = release
_version = Version(release)
if _version.is_devrelease:
version = release = f"{_version.base_version}.dev{_version.dev}"
# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ classifiers = [

[project.optional-dependencies]
test = ["pytest", "pytest-doctestplus", "pytest-cov", "ruff", "coverage"]
docs = ["sphinx", "sphinx-autoapi", "sphinx-automodapi", "pydata-sphinx-theme", "sphinx-favicon", "ipython"]
docs = ["sphinx", "sphinx-autoapi", "sphinx-automodapi", "pydata-sphinx-theme", "sphinx-favicon", "ipython", "packaging"]

[project.scripts]
simpunch = "simpunch.cli:main"
Expand Down

0 comments on commit 5a084f7

Please sign in to comment.