User-facing documentation for the Synapse Python Client. Built with MkDocs + Material theme, deployed via GitHub Pages. Follows the Diataxis documentation framework with four content types: tutorials, guides, reference, and explanations.
MkDocs with Material theme, mkdocstrings (Google-style docstrings), termynal (CLI animations), markdown-include (file embedding).
- Use built-in generics (
list,dict,tuple,set) instead oftyping.List,typing.Dict, etc. (Python 3.9+)
- tutorials/ — Step-by-step learning (competence-building). Themed around a biomedical researcher working with Alzheimer's Disease data. Progressive build-up: Project → Folder → File → Annotations → etc.
- guides/ — How-to guides for specific use cases (problem-solution oriented). Includes extension-specific guides (curator).
- reference/ — API reference auto-generated from docstrings via mkdocstrings. Split into
experimental/sync/andexperimental/async/for new OOP API. - explanations/ — Deep conceptual content ("why" not just "how"). Design decisions, internal machinery.
Tutorial code lives in tutorials/python/tutorial_scripts/*.py and is embedded in markdown via line-range includes:
{!docs/tutorials/python/tutorial_scripts/annotation.py!lines=5-23}Single source of truth — edit the .py file, not the markdown. Changing line numbers in scripts requires updating the line ranges in the corresponding .md files.
Reference markdown files use ::: synapseclient.ClassName syntax to trigger auto-generation from docstrings. Key configuration:
docstring_style: google— parse Google-style docstringsmembers_order: source— preserve source code orderfilters: ["!^_", "!to_synapse_request", "!fill_from_dict"]— private members,to_synapse_request(), andfill_from_dict()are excluded from docsinherited_members: true— shows mixin methods on inheriting classes- Member lists are explicit — each reference page specifies which methods to document
Pattern: [](){ #reference-anchor } in reference pages. Tutorials link to reference via [API Reference][project-reference-sync]. Explicit type hints use: [syn.login][synapseclient.Synapse.login].
Terminal animation blocks marked with <!-- termynal --> HTML comment. Prompts configured as $ or >. Used in authentication.md and installation docs.
- API reference indentation:
doc-contentshas 25px left padding with border - Smaller table font (0.7rem) for API docs
- Wide layout:
max-width: 1700pxfor complex content
Defined in mkdocs.yml nav section. 5 main sections: Home, Tutorials, How-To Guides, API Reference, Further Reading, News. API Reference has ~85 markdown files (~40 legacy, ~45 experimental).
- Do not edit tutorial code inline in markdown — edit the
.pyscript file intutorial_scripts/and update line ranges if needed. - Reference docs auto-generate from source docstrings — to change method documentation, edit the docstring in the Python source, not the markdown.
mkdocs.ymlis at the repo root, not indocs/— it configures the entire doc build.- Docs deploy to Read the Docs (configured via
.readthedocs.yamlat repo root). - Local build output goes to
docs_site/(viasite_dirinmkdocs.yml) — gitignored. - Cross-referencing uses the
autorefsplugin:[display text][synapseclient.ClassName.method]auto-resolves to mkdocstrings anchors.
Release notes live in docs/news.md. Each release gets a heading with the version number and date, followed by bullet points describing changes. Group entries by category (Features, Bug Fixes, etc.). Reference Jira ticket numbers (SYNPY-XXXX) in each entry.