rethinkpriorities / squigglepy

Squiggle programming language for intuitive probabilistic estimation features in Python
MIT License
65 stars 8 forks source link

Add API docs using Sphinx #59

Open michaeldickens opened 12 months ago

michaeldickens commented 12 months ago

Implementation of issue #44.

Changes:

  1. Create Sphinx docs in doc/.
  2. Use sphinx-apidoc to auto-generate API docs for all modules in docs/source/reference/.
  3. Port over README.md (with some slight rewrites) to docs/source/index.rst, installation.rst, and usage.rst.
  4. Generate HTML from docs at docs/build/html/.

To build docs:

  1. cd doc
  2. make buildapi
  3. make html

To view docs, open docs/build/html/index.html in your browser.

(Note: Makefile was generated by Sphinx, but I added the make buildapi based on this StackOverflow answer.)

michaeldickens commented 12 months ago

I forgot, I need to update Poetry to add a dependency for pydata_sphinx_theme

Edit: fixed

michaeldickens commented 12 months ago

I am not sure whether the doc/build/ directory should be tracked, I noticed that scipy does track their doc/build/ but it contains binaries and stuff that git doesn't deal with well.