vocalpy / crowsetta

A tool to work with any format for annotating animal sounds
https://crowsetta.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
51 stars 3 forks source link

DEV: add `docs` session to noxfile.py #138

Closed NickleDave closed 2 years ago

NickleDave commented 2 years ago

will require a bit of work esp because of use of notebooks in docs -- need to refresh my memory on how this works.

this is the session from the awkard-array, appears to avoid using make or Make.bat. I've never used sphinx-build before.

@nox.session
def docs(session):
    """
    Build the docs. Pass "serve" to serve.
    """
    session.install(".[doc]")
    session.run("sphinx-build", "-M", "html", ".", "_build")

    if session.posargs:
        if "serve" in session.posargs:
            session.log("Launching docs at http://localhost:8000/ - use Ctrl-C to quit")
            session.run("python", "-m", "http.server", "8000", "-d", "_build/html")
        else:
            session.error("Unsupported argument to docs")