Skip to content

ci: Fix doc dependency resolving#475

Merged
ValerianRey merged 6 commits intomainfrom
update-doc-dependency-caps
Oct 29, 2025
Merged

ci: Fix doc dependency resolving#475
ValerianRey merged 6 commits intomainfrom
update-doc-dependency-caps

Conversation

@ValerianRey
Copy link
Copy Markdown
Contributor

@ValerianRey ValerianRey commented Oct 29, 2025

  • uv somehow decides to constrain libraries to be compatible with the whole range of python versions supported by torchjd (3.10-3.13) when resolving, so it does not install libraries that require python 3.11+ for example, even when using python 3.13. This leads to outdated library versions installed in the CI and locally, especially documentation-related libraries.
  • Adding --python-version=... forces uv to resolve libraries compatible with the specified python version only, fixing the issue
  • When using uv run ..., uv automatically re-syncs. There's no way to specify the python-version for which to resolve when this happens, so the idea is to prevent this resyncing by either using --no-sync everytime we call uv run, or by using the UV_NO_SYNC=1 environment variable. This is done in both ci files that have a uv run, and it's now recommended in CONTRIBUTING.md
  • Uncap furo (our sphinx theme): it just changes color of already-clicked links, which is not that bad IMO (and we can probably override this). It's also required for compatibility with more recent versions of other libraries.
  • Increase lower cap of sphinx-autodoc-typehints. Before 3.5.0, it's not compatible with Python 3.14.

* Uncap furo (our sphinx theme): it just changes color of already-clicked links, which is not that bad IMO (and we can probably override this).
* Increase lower cap of sphinx-autodoc-typehints. Before 3.5.0, it's not compatible with Python 3.14.
* uv somehow decides to constrain libraries to be compatible with the whole range of python versions supported by torchjd (3.10-3.13) when resolving, so it does not install libraries that require python 3.11+ for example, even when using python 3.13. This leads to outdated library versions installed in the CI and locally, especially documentation-related libraries.
* Adding --python-version=... forces uv to resolve libraries compatible with the specified python version only, fixing the issue
* When using `uv run ...`, uv automatically re-syncs. There's no way to specify the python-version for which to resolve when this happens, so the idea is to prevent this resyncing by either using --no-sync everytime we call uv run, or by using the UV_NO_SYNC=1 environment variable. This is done in both ci files that have a uv run, and it's now recommended in CONTRIBUTING.md
@ValerianRey ValerianRey changed the title chore: Update doc dependency caps ci: Fix doc dependency resolving Oct 29, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
see 52 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ValerianRey
Copy link
Copy Markdown
Contributor Author

@PierreQuinton FYI: you should:

  • Add export UV_NO_SYNC=1 in your .zshrc
  • Update your installation alias (if you have any) to add --python-version=3.14
  • Restart terminal
  • Reinstall torchjd
  • Call uv run python and check that uv pip show sphinx-autodoc is at version 3.5.2

@ValerianRey ValerianRey merged commit 7e7c623 into main Oct 29, 2025
17 checks passed
@ValerianRey ValerianRey deleted the update-doc-dependency-caps branch October 29, 2025 15:20
ValerianRey added a commit that referenced this pull request Oct 30, 2025
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.

1 participant