Skip to content

docs: import version and specification version from sigmf #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
12 changes: 5 additions & 7 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@
import sys
from pathlib import Path

# parse info from project files
import sigmf

root = Path(__file__).parent.parent.parent
with open(root / "sigmf" / "__init__.py", "r") as handle:
init = handle.read()
toolversion = re.search(r'__version__\s*=\s*[\'"]([^\'"]*)[\'"]', init).group(1)
specversion = re.search(r'__specification__\s*=\s*[\'"]([^\'"]*)[\'"]', init).group(1)
toolversion = sigmf.__version__
specversion = sigmf.__specification__

# autodoc needs special pathing
root = Path(__file__).parent.parent.parent
sys.path.append(str(root))

# -- Project information
Expand Down Expand Up @@ -68,4 +66,4 @@
]
frozen_locals = dict(locals())
rst_epilog = '\n'.join(map(lambda x: f".. |{x}| replace:: {frozen_locals[x]}", variables_to_export))
del frozen_locals
del frozen_locals