Skip to content

Conversation

@david-tingdahl-nvidia
Copy link
Contributor

In #110 we fixed versioning in multiversion docs.
This MR backports necessary changes to v0.0.8 such that we can correctly retrieve the version number.

david-tingdahl-nvidia and others added 5 commits January 28, 2026 09:42
* Fix version number in wheel URLs
* Remove version in html header
Use environment variables from sphinx-multiversion instead of importing
from setup.py to avoid Python module caching issues.

Changes:
- Create helpers.py with get_version_from_multiversion_env()
- Update conf.py to use new version detection function
- Add sphinx-multiversion extension and configuration
- Update html_title to include version number
- Change branch whitelist to use v0.0.8-docs and v0.0.9-docs
- Add debug logging to trace version detection

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
sphinx-multiversion changes the current working directory to the checked-out
version's location, but __file__ still points to the original file. This caused
all versions to read from the same setup.py file.

Use os.getcwd() instead of os.path.dirname(__file__) to find setup.py.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Apply the same fix used in v0.0.9-docs to use Sphinx's setup() function
for version detection instead of importing from helpers.py.

Changes:
- Add setup() function that detects version from app.srcdir
- Update nvblox_torch_docs_config with correct wheel URLs and names
- Add _templates/versioning.html for sphinx-multiversion sidebar
- Ensures v0.0.8-docs shows correct version (0.0.8) in title and wheel URLs

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Remove unnecessary NVBLOX_VERSION_NUMBER global variable and html_title
modifications. The version is now only used locally within the setup()
function to update wheel URLs and filenames.

Changes:
- Remove global NVBLOX_VERSION_NUMBER and NVBLOX_VERSION_PATCH variables
- Remove html_title updates (not needed in page title)
- Pass version directly to _get_wheel_name() function
- Initialize nvblox_torch_docs_config with empty strings (updated in setup())

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@david-tingdahl-nvidia
Copy link
Contributor Author

will try other/cleaner method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants