augur icon indicating copy to clipboard operation
augur copied to clipboard

Check docs build in CI

Open victorlin opened this issue 2 years ago • 1 comments

Context

Currently, the docs build shows warnings that have slipped through due to a lack of CI (prompting manual fixes in #1046). This was also the case with ncov, which https://github.com/nextstrain/ncov/pull/941 addressed. Usage of docs-ci should be expanded to Augur docs as well as other docs projects.

However, docs-ci is not directly usable by the Augur docs project. This is because it requires a Conda environment file to set up the environment, and the Augur docs project does not have one. Instead, the environment is set up using:

https://github.com/nextstrain/augur/blob/862bbb6bf2806cfa4f5ec3a1f5a24a8ca83c14b6/docs/contribute/DEV_DOCS.md?plain=1#L291

Possible solutions

  1. Create a Conda environment file in the Augur docs project. This must include all of the setup.py base packages + extra dev packages, and would be an additional list of dependencies to maintain.
  2. Update docs-ci to allow either setup using Conda or pip. However, it's unclear how to parameterize this. Maybe have an input pip-install-target and run: pip install -e '{{ inputs.pip-install-target }}'?
  3. Update docs-ci to be an action instead of workflow, so it's up to the calling workflow to set up the environment. But then the action would just be running make with some predefined SPHINXOPTS.

victorlin avatar Sep 16 '22 22:09 victorlin

I'd vote for (2), which was a previous suggestion of mine as well.

tsibley avatar Sep 19 '22 17:09 tsibley

Docs CI should also check that all Python modules under augur/ have a corresponding .rst file and properly included in at least the Developer API docs (e.g. to ensure discrepancies such as ef44043a54a0b1dd0f0190507b0b2118614b6838 are noticed by CI and not manually).

victorlin avatar Jan 26 '23 01:01 victorlin