Development¶
Local workflow¶
Common commands for working on the repo:
python -m pip install -e ".[dev]"
pytest
ruff check .
ruff format .
uvx ty check xdflow
If you use the checked-in lockfile:
uv sync --extra dev --extra docs
uv run pytest
uv run ruff check xdflow tests examples
uv run mkdocs serve
Documentation maintenance¶
The docs site is built with MkDocs Material and published via Read the Docs.
Important files:
mkdocs.yml: site structure, theme, plugins, and nav.readthedocs.yaml: RTD build configurationdocs/: Markdown content and static docs assets
Before submitting doc changes, run:
uv run mkdocs build --strict
Read the Docs publishing¶
Read the Docs uses .readthedocs.yaml, installs the docs extra from pyproject.toml, and builds the site with mkdocs.yml.
To publish documentation updates:
- Add or edit pages under
docs/. - Add new public pages to the
navsection inmkdocs.yml. - Run
uv run mkdocs build --strictlocally. - Push or merge to the branch configured as the Read the Docs default branch.
The GitHub Actions docs job also runs mkdocs build --strict, so docs failures should be visible before tagging or publishing a release.
Writing docs for new features¶
When adding a new transform or workflow:
- Update the relevant concept or tutorial page if the user-facing behavior changes.
- Link to or update Writing Custom Transforms or Writing Custom Cross-Validators when extension behavior changes.
- Add or expand API documentation if the module belongs to the core dependency set.
- Keep examples based on
xarray.DataArrayand make dimensions, coordinates, targets, groups, and split policies explicit. - Add tests alongside the feature when behavior or contracts change.