Development
This page describes the developer workflow: updating notebooks, rebuilding the documentation site, and the release checklist.
Developer workflow
- Clone and install (see Contributing).
- Make changes in
src/cdmconnector/or indocs-src/(notebooks,.qmdpages). - Run tests:
pytest tests -v - Lint:
ruff check src tests - Rebuild docs when you change API or narrative content (see below).
Updating notebooks
- Notebooks live in
docs-src/notebooks/as.ipynbfiles. - Run Jupyter from the repository root so paths like
docs-src/assets/cohort_jsonresolve. - Outputs can be pre-rendered; Quarto renders notebooks without executing by default (execute is controlled in
_quarto.ymlor per-file YAML if needed). - After editing a notebook, run
quarto render docs-src/to regenerate HTML indocs/.
Rebuilding docs
From the repository root:
# 1. Generate API reference (writes into docs-src/reference/)
quartodoc build
# 2. Render website into docs/
quarto render docs-src/Ensure Quarto CLI is installed (quarto.org); it is not installed via pip. After a successful build, docs/ contains the full site (index, tutorials, reference, contributing, development). Commit the updated docs/ if your workflow uses committed HTML for GitHub Pages.
Release checklist (PyPI)
Before publishing to PyPI:
- Version — Bump version in
pyproject.tomlandsrc/cdmconnector/__init__.py(or use single source from pyproject). - Tests —
pip install -e ".[dev]" && pytest tests -v; ensure supported Python versions (CI covers these). - Lint —
ruff check src tests; fix any issues. - Docs — Run
quartodoc buildandquarto render docs-src/; confirm no broken links or missing API pages. - Build —
pip install build && python -m build; checkdist/for.whland.tar.gz. - Publish —
pip install twine && twine upload dist/*(use Test PyPI first:twine upload --repository testpypi dist/*). - Changelog — Update
CHANGELOG.mdwith the release date and any last-minute notes.
Optional: exclude tests/docs from the wheel if needed; current config packages only src/cdmconnector.