From faec0f17999a6d537475d7144984eec517e47963 Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Sun, 8 Oct 2023 00:27:02 +0200 Subject: [PATCH] Add dev docs on how to build locally --- .gitignore | 1 + CONTRIBUTING.md | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/.gitignore b/.gitignore index 090a1f02..0fb8ed18 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .idea .DS_Store +_build/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..c4039652 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,22 @@ +# Developer guide + +## Building the docs locally + +Install Python 3.11. + +Then run: + +```sh +READTHEDOCS_VIRTUALENV_PATH=~/.virtualenvs/ena-read-docs +READTHEDOCS_OUTPUT=./_build +python -mvirtualenv $READTHEDOCS_VIRTUALENV_PATH +source "$READTHEDOCS_VIRTUALENV_PATH/bin/activate" +python -m pip install --upgrade pip setuptools +python -m pip install --upgrade sphinx readthedocs-sphinx-ext +python -m pip install --exists-action=w --no-cache-dir -r requirements.txt +python -m sphinx -T -E -b html -d $READTHEDOCS_OUTPUT/doctrees -D language=en . $READTHEDOCS_OUTPUT/html +``` + +These are the same commands that are run on ReadTheDocs. + +You can adjust the variables `READTHEDOCS_VIRTUALENV_PATH` and `READTHEDOCS_OUTPUT` to your liking.