### Install quartodoc using pip Source: https://github.com/machow/quartodoc/blob/main/README.md Install quartodoc from PyPI using pip. ```bash python -m pip install quartodoc ``` -------------------------------- ### Install quartodoc from GitHub Source: https://github.com/machow/quartodoc/blob/main/README.md Install the latest development version of quartodoc directly from its GitHub repository using pip. ```bash python -m pip install git+https://github.com/machow/quartodoc.git ``` -------------------------------- ### Configure quartodoc object lookup Source: https://github.com/machow/quartodoc/blob/main/README.md Example configuration for quartodoc specifying the package and a list of objects to document. This demonstrates how to include functions, submodules, classes, and methods. ```yaml quartodoc: package: quartodoc sections: - title: Some section desc: "" contents: - get_object # function: quartodoc.get_object - ast.preview # submodule func: quartodoc.ast.preview - MdRenderer # class: quartodoc.MdRenderer - MdRenderer.render # method: quartodoc.MDRenderer.render - renderers # module: quartodoc.renderers ``` -------------------------------- ### Configure quartodoc in _quarto.yml Source: https://github.com/machow/quartodoc/blob/main/README.md A minimal configuration for quartodoc within a _quarto.yml file. This setup specifies the package to document and the output paths for generated sidebar and CSS files. ```yaml project: type: website # tell quarto to read the generated sidebar metadata-files: - reference/_sidebar.yml # tell quarto to read the generated styles format: html: css: - reference/_styles-quartodoc.css quartodoc: # the name used to import the package you want to create reference docs for package: quartodoc # write sidebar and style data sidebar: reference/_sidebar.yml css: reference/_styles-quartodoc.css sections: - title: Some functions desc: Functions to inspect docstrings. contents: # the functions being documented in the package. # you can refer to anything: class methods, modules, etc.. - get_object - preview ``` -------------------------------- ### Build the site Source: https://github.com/machow/quartodoc/blob/main/examples/dascore/index.md Use this command to build the project site. ```bash make build ``` -------------------------------- ### Preview quarto site Source: https://github.com/machow/quartodoc/blob/main/README.md Preview the generated documentation website locally using the quarto preview command. ```bash quarto preview ``` -------------------------------- ### Build quartodoc documentation Source: https://github.com/machow/quartodoc/blob/main/README.md Generate the reference API documentation pages using the quartodoc build command. ```bash quartodoc build ``` -------------------------------- ### Preview Sphinx Inventory File Source: https://github.com/machow/quartodoc/blob/main/case_studies/sphinx-inventory.md Use this command to preview the contents of a Sphinx inventory file from your terminal. ```bash python -m sphinx.ext.intersphinx ``` -------------------------------- ### Watch for changes and rebuild documentation Source: https://github.com/machow/quartodoc/blob/main/README.md Continuously monitor the documented library for changes and automatically regenerate documentation pages as they occur. ```bash quartodoc build --watch ``` -------------------------------- ### Load Sphinx Inventory File in Python Source: https://github.com/machow/quartodoc/blob/main/case_studies/sphinx-inventory.md Load a Sphinx inventory file into a Python object for easy access to its contents. Requires the `sphinx.util.inventory.InventoryFile` class. ```python from sphinx.util.inventory import InventoryFile from os import path SQLALCHEMY_DOCS_URL = "https://docs.sqlalchemy.org/" SQLALCHEMY_INV_URL = f"{SQLALCHEMY_DOCS_URL}/objects.inv" with open("objects_sqla.inv", "rb") as f: inv = InventoryFile.load(f, SQLALCHEMY_DOCS_URL, path.join) ``` -------------------------------- ### List Inventory File Types Source: https://github.com/machow/quartodoc/blob/main/case_studies/sphinx-inventory.md Iterate over the loaded inventory object to list all available inventory types. ```python list(inv) ``` -------------------------------- ### Access Specific Inventory Item Source: https://github.com/machow/quartodoc/blob/main/case_studies/sphinx-inventory.md Retrieve details for a specific item, such as a function, from the loaded inventory. ```python inv["py:function"]["sqlalchemy.create_engine"] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.