Skip to content

Commit

Permalink
Use autogenerated _version.py file in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
flferretti committed Jan 24, 2024
1 parent 50b2b3d commit f221d59
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ build:
conda:
environment: docs/jaxsim_conda_env.yml

python:
install:
- method: pip
path: .

sphinx:
configuration: docs/conf.py

Expand Down
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import pathlib
import sys

from pkg_resources import get_distribution

# -- Version information

sys.path.insert(0, os.path.abspath("."))
Expand All @@ -11,10 +13,8 @@

module_path = os.path.abspath("../src/")
sys.path.insert(0, module_path)
version_file = os.path.abspath("../src/jaxsim/version.txt")

with open(version_file) as file_handler:
__version__ = file_handler.read().strip()
__version__ = get_distribution("jaxsim").version

# -- Project information

Expand Down

0 comments on commit f221d59

Please sign in to comment.