Skip to content

Add a Sphinx docs site and an example on every public entrypoint - #112

Open
jessegrabowski wants to merge 25 commits into
pymc-devs:mainfrom
jessegrabowski:docs-setup
Open

Add a Sphinx docs site and an example on every public entrypoint#112
jessegrabowski wants to merge 25 commits into
pymc-devs:mainfrom
jessegrabowski:docs-setup

Conversation

@jessegrabowski

Copy link
Copy Markdown
Member

The README was the only documentation. This adds a Sphinx site — install and contributing guides, a style guide, an autosummary API reference, and a gallery whose pages and sections come from the folder layout under examples/.

Every public entrypoint also gained a runnable Examples block, and the suite executes them, so a docstring that drops an import fails CI. That's most of the diff.

Nothing is published until the Read the Docs project is imported; .github/workflows/rtd-preview.yml assumes the slug pytensor-ml.

Closes #28

Read the Docs cannot read a pixi environment, so conda_envs/environment-docs.yml duplicates the docs dependency list that pyproject.toml also carries.
Each block executes in a fresh namespace and its own directory, so an example that omits an import or leans on another one fails rather than shipping broken.
The type aliases move to their defining modules on the API page because autodoc reads an attribute docstring from the module that defines it, not from the package re-exporting it.
A notebook's path sets where it lands: examples/<page>/<section>/nb.ipynb, where a page with no notebooks writes no file rather than a dangling toctree entry.
A type alias carries its docstring under the assignment rather than in __doc__, so the six in optim were never scanned.
Both docstring sweeps parametrize over these, so a collector that quietly returns less takes its own tests with it and the suite stays green.
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

A doctest plugin covers this ground, so the docs no longer claim the suite runs the examples in them.
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.

Expand README with usage examples and project documentation

1 participant