QIIME 2 documentation source
Source repository for https://docs.qiime2.org.
This repository does not include built docs. Do not commit built docs to this repository.
Make source changes in this repository as described in Contributing to the docs below and submit these changes as a pull request.
Contributing source changes is a separate step from building and publishing the changes. See Publishing below for building and publishing the docs to the live site (typically this will be done by one of the QIIME 2 developers).
Contributing to the docs
Install the dependencies necessary to build the docs:
pip install -r requirements.txt
Install the QIIME 2 framework. Typically you'll want the latest development version (i.e. master branch). You can find the latest builds for your operating system here. Make sure you get the raw link for your OS (e.g.
osx-64) then you can use
conda install --file <URL>to install.
Make your changes to the source RST.
When writing shell commands in the docs, use the custom
.. command-block::directive. This directive formats the commands with shell syntax highlighting and will execute each command, reporting any errors (similar to doctests). You'll need the latest development versions (i.e. master branches) of the QIIME 2 packages required by the commands in the docs.
If you're writing shell commands that shouldn't be automatically executed (e.g.
cdcommands, etc.), use the
:no-exec:option with the
command-blockdirective. Check out the existing docs for examples.
make previewto build the docs without running any of the
command-blockcommands. Use this to quickly build the docs while developing them (e.g. to check correct rendering of RST).
make linkcheckto make sure all URLs can be reached.
When you're done with your changes, run
make htmlto build the docs and run all
command-blockcommands. This can take awhile to complete (currently 20-30 minutes). If you didn't make changes to any
command-blockcommands, or add any new ones, you can skip this step.
Docs are hosted on AWS S3. Perform the following steps to build and publish the docs:
Install the AWS CLI. There are many ways to do this. For example, it is pip-installable:
pip install awscli
Configure the AWS CLI with the proper login credentials (e.g. access key, secret access key, etc.) to access the
docs.qiime2.orgS3 bucket. Access is currently limited to core QIIME 2 developers.
Build the docs:
Upload the built docs to S3, specifying the QIIME 2 version these docs were built for. For example, if the docs were built for the QIIME 2 2.0.6 release, use the bucket prefix (i.e. subdirectory)
--deletein case the build is replacing a previous versioned build.
aws s3 sync build/html s3://docs.qiime2.org/<build-version> --acl public-read --delete
Optional: If this build should be the default version accessible from https://docs.qiime2.org, modify the HTTP redirect in
publish-assets/index.htmlto point to this build's version.
Note: The default version should be the latest public release of QIIME 2. Development version builds can be uploaded but should not be redirected to.
i. Upload the modified
aws s3 cp publish-assets/index.html s3://docs.qiime2.org/ --acl public-read
ii. Commit the modified
publish-assets/index.htmlfile and submit a pull request.
The build should now be available on the live site!