Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ sphinx:

# declare the Python requirements required to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
# Install the package itself so that the version can be fetched dynamically during docs building (see docs/source/conf.py)
python:
install:
- requirements: docs/requirements.txt
install:
- method: pip
path: .
extra_requirements: [docs]
10 changes: 8 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@

import os
import sys
try:
from cpax import __version__
except (ImportError, AttributeError) as e:
raise RuntimeError(
"Failed to import `__version__` from the `cpax` package. Ensure that the `cpax` package is installed "
"and contains a `__version__` attribute."
) from e
sys.path.insert(0, os.path.abspath('../../src'))
import importlib.metadata

project = 'CPax'
copyright = '2025, Jan Lukas Späh'
author = 'Jan Lukas Späh'
release = importlib.metadata.version("cpax")
release = __version__
version = ".".join(release.split(".")[:2])

# -- General configuration ---------------------------------------------------
Expand Down