pyOpenSci is devoted to building diverse, supportive community around the Python open source tools that drive open science. We do this through:
- open peer review
- mentorship
- training
pyOpenSci is an independent organization, fiscally sponsored by Community Initiatives.
This repository contains the source files for the pyOpenSci Python packaging guide.
Our guidebook is built with Sphinx which is a documentation tool and uses the pydata-sphinx-theme.
The easiest way to build our documentation is to use the nox
automation tool,
a tool for quickly building environments and running
commands within them.
Using nox
ensures that your environment has all the dependencies needed to build the documentation.
To build, follow these steps:
-
Install
nox
$ python -m pip install nox
-
Build the documentation:
$ nox -s docs
This should create a local environment in a .nox
folder, build the documentation (as specified in the noxfile.py
configuration), and the output will be in _build/html
.
To build live documentation that updates when you update local files, run the following command:
$ nox -s docs-live
When building for release, the docs are built multiple times for each translation, but translations are only included in the production version of the guide after some completion threshold.
The sphinx build environment is controlled by an environment variable SPHINX_ENV
- when
SPHINX_ENV=development
(default), sphinx assumes all languages are built, and includes them in the language selector - when
SPHINX_ENV=production
, only those languages inrelease_languages
(set inconf.py
) are built and included in the language selector.
Most of the time you should not need to set SPHINX_ENV
,
as it is forced by the primary nox sessions intended to be used for release or development:
SPHINX_ENV=development
docs-live
- autobuild englishdocs-live-lang
- autobuild a single languagedocs-live-langs
- autobuild all languages
SPHINX_ENV=production
build-test
- build all languages for production
We welcome and issues and pull requests to improve the content of this guide. If you'd like to see an improvement, please open an issue.
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!