Note: the published version of the docs are built automatically by the GitHub pipeline; you don't need to do anything locally after pushing your changes.
git clone https://github.com/GeoscienceAustralia/dea-docs.git
cd dea-docs
Local building can be done by running a live server in Docker, which supports live-reloading.
There is also a legacy approach, retained at the end of this document.
make fetchnotebooks
make docker-live
Notes:
-
The
make fetchnotebookstarget downloads thedea-notebooksrepository to incorporate documentation from there. If you don't need to see documentation pages fromdea-notebooksin your live test, it is suggested you do not run the step. -
The
dea-notebooksrepository is very large (~2GB). Therefore:- We clone using the flag
--depth 1(to only fetch the latest commit on the current branch). We specify the branch asstableduring the clone. - The resultant clone is typically a couple of hundred MB.
- We clone using the flag
Known issues!
- Local builds with
make fetchnotebookscurrently output a significant number of warnings before stabilising.
Package versions are pinned in requirements.txt and built from requirements.in (with less specific pinning). Check the top of requirements.txt for info (do not make changes there).
Typically an update will involve:
pip install --user pip-tools
pip-compile --output-file=requirements.txt requirements.in
- DEA docs still uses the
recommonmarkmarkdown parser, which is no longer supported. It should be switchedsphynxwhich DEA internal docs uses. Manual checks for poorly formatted pages will need to be conducted! - Many pinned package versions are outdated and should be revised.
- There are build issues relating to various pieces of documentation in dea-notebooks. These appear to be breaking relevant parts of the build, causing
dea-notebookscontent not to be output in the live build. This should be investigated, and dependencies updated. It is recommended you do not runmake fetchnotebooksfor now (and in general only if you are specifically interested in how documentation indea-notebookswill be rendered).
See the contribution instructions for more details.
conda create -c conda-forge -n deadocs --file requirements.txt
conda activate deadocs
pip install -r requirements.txt
make fetchnotebooks html
open _build/html/index.html
Note: to perform subsequent legacy builds that don't include updates to the
dea-notebooksrepository, you only need to runmake html.