2. Static files → no content management system 3. Content lives with code 4. Continuously integrate docstrings/tutorials 5. Maintainable, mechanized content 6. Every stack developer is a doc writer 7. Aligned with the Python ecosystem 8. Be good to the reader 9. Don’t document broken code; fix it 2
is extensible • Build to static HTML, LaTeX, etc. • Jinja2 templates, bring your own CSS/JavaScript • API Reference generation from docstrings - Python: autodoc/numpydoc - C++: Breathe bridges Doxygen XML • Sphinx is completely extensible (with Python) - Add reST roles (inline) and directives (blocks) 3
Tutorials Processing a single image Processing with the Butler … Stack Packages afw meas_base … Developer Guide Development workflow Code Standards … overview.rst install.rst eups.rst github.com/lsst/afw github.com/lsst/meas_base dev/workflow.rst dev/standards.rst github.com/lsst/single_img_tutorial github.com/lsst/butler_tutorial reST files in docs repo docs live in pkg. repo we’ll provide doc templates for devs
practices; quick hacks not wanted. • Lightweight analysis tutorials - might be backed by Jupyter notebooks - rendered into documentation site • Pipeline development tutorials: - text + git repo - each tutorial stage is tagged 11
1. User guide / lightweight examples 2. API Reference (docstrings) • We will provide a clear template and guidelines 12 package_name Python API Reference C++ API Reference User guide + examples API with examples in docstrings
from a Bigtable. More paragraphs of documentation. :param a: something. :type a: int :param b: Some other thing with some type. :type b: str :param keyword: An optional variable, that has a much longer explanation than the other args. :type keyword: bool :returns: A dict that means something to you: {'Serak': ('Rigel VII', 'Preparer'), 'Zim': ('Irk', 'Invader'), 'Lrrr': ('Omicron Persei 8', 'Emperor')} More explanation. :rtype: dict :raises IOError: An error occurred accessing something. """
from a Bigtable. More paragraphs of documentation. Args: a: An int for something. b: Some other thing with some type. keyword: An optional variable, that has a much longer explanation than the other args. Returns: A dict that means something to you: {'Serak': ('Rigel VII', 'Preparer'), 'Zim': ('Irk', 'Invader'), 'Lrrr': ('Omicron Persei 8', 'Emperor')} More explanation. Raises: IOError: An error occurred accessing something. """ with napoleon http://bit.ly/1MBtOwW
from a Bigtable. More paragraphs of documentation. Parameters —————————— a : int An int for something. b : str Some other thing. keyword : str, optional An optional variable, that has a much longer explanation than the other args. Returns ——————— my_dict : dict Something that means something to you:: {'Serak': ('Rigel VII', 'Preparer'), 'Zim': ('Irk', 'Invader'), 'Lrrr': ('Omicron Persei 8', 'Emperor')} Raises —————— IOError: An error occurred accessing something. """ napoleon/numpydoc http://bit.ly/1LjBt2O
layer? C++ Only C++ & Python Python Only Need to balance developer efficiency, C++ and Python doc parity, and user experience. Interactive python docstrings matter.
Sass / Susy / gulp / responsive [images] - CI of website - Optimize navigation for long pages • Templates for docs and tutorials • Style guide for docs / writing • Continuous integration of examples, tutorials • Integration with community.lsst.org • Academic citation guidance throughout • Even better search of code+docs (Elasticsearch?) 18
Board Solve API issues before shipping Doc & QA Teams are board members 1. Developers present API and fill out the documentation template 2. Achieve consensus over 1. API naming consistency 2. Design idioms/consistency 3. Error codes 4. Usability / documentability 19 Docs as QA