Make the docs build warning-free under --strict and gate it in CI (Issue #241)#265
Make the docs build warning-free under --strict and gate it in CI (Issue #241)#265egmaminta wants to merge 3 commits into
Conversation
decord ships wheels only for manylinux2010_x86_64 and win_amd64 (no macOS arm64 wheel and no sdist), so the previous unconditional dependency broke uv sync on macOS. decord is now gated to non-darwin platforms and av (PyAV) is pulled in on darwin instead. VideoDataset selects a decoder at runtime: decord where available, otherwise a small PyAV-backed reader that exposes the same integer-indexing and get_batch API and returns identical uint8 (N, C, H, W) tensors. MP4 writing already went through imageio. Adds an av round-trip test (skipped when av is absent) and updates the backend import-error test.
mkdocs build --strict was failing with 13 warnings, but CI only ran a plain mkdocs build, so these could (and did) slip through unnoticed. - lance: the LanceDataset Args block lumped six parameters onto a single line, which griffe cannot parse into individual parameter entries. Document each one separately so the Dataset reference renders correctly. - data/utils, data/normalization: add the parameter and return type annotations griffe flagged (load_dataset, convert, column_normalizer, get_scaler). Forward references stay under TYPE_CHECKING. - dmc: the expert-training link pointed at scripts/expert/train_policies.py, which does not exist. Point it at the SAC trainer actually used, scripts/expert/sac_online.py. - nav: add envs/piecewise.md, a finished page that was not linked anywhere. With those resolved, switch the docs CI job to mkdocs build --strict so the reference stays warning-free.
| if TYPE_CHECKING: | ||
| from stable_pretraining.data.transforms import WrapTorchTransform | ||
|
|
||
| from stable_worldmodel.data.dataset import Dataset | ||
|
|
|
thank you for the pr! can you address my comment? |
Good day to you @lucas-maes ! So these two imports back the type annotations added to the autodoc'd functions in this PR:
They have to be resolvable because And since this PR switches CI to
|
While going through the docs for Issue #241 I noticed
mkdocs build --strictfails with 13 warnings, but CI only runs a plainmkdocs build, so they ship silently. This PR clears all of them and turns on--strictso the API reference stays clean.LanceDatasetdocumented six params on one line, so griffe couldn't split them into individual entries and they rendered wrong. Each is documented separately now.data/utils,data/normalizationadded the parameter/return annotations griffe flagged (load_dataset,convert,column_normalizer,get_scaler); forward refs kept underTYPE_CHECKING.scripts/expert/train_policies.py, which doesn't exist; now points at the SAC trainer actually used,scripts/expert/sac_online.py.envs/piecewise.md, a finished page that wasn't reachable.Verified these locally by running
mkdocs build --strict(clean) pluspytest tests/data(passes), ruff also clean.Refs #241: I'm open to tackle data-layer docstrings, a beginner concepts page, or the solver reference . Just let me know.