How to update documentation in Taweret website
We use sphinx
python documentation generator to generate the webpage
for our python package. It uses reStructuredText
as the plaintext markup
language.
You might find this cheatsheet useful.
You can also refer to sphinx website for more information.
Steps
Step 1: Fork Taweret repo, clone it, and checkout the develop branch
git clone <your_fork>
git checkout develop
Step 2: Create a virtual environment for Taweret and install dependencies
With conda:
conda env create --file=environment.yml
conda activate test_env
conda install pip
pip install -e .
With venv:
python3 -m venv test_env
source test_env/bin/activate
pip install -e .
# You will need to install pandoc using your OS package manager
Step 4: Locally generate documentation webpage
cd docs
sh run_to_rebuild_tawret_rst.sh
This will create a webpage locally and open it in your default web browser.
You can modify the files inside Taweret/docs/source
to make changes to
the webpage.
Taweret/docs/source/index.rst
determines the overall structure of the
webpage. Each file that is referenced in the index.rst
can be found in
the same folder.
For example, if you want to modify the introduction,
change Taweret/docs/source/intro.rst
.
After you make changes and locally build the web page, you can push these changes to the original webpage by following the below set of instructions.
git add <file_you_changed_inside_source_directory>
git commit -m <you commit messege>
git push origin develop
Then make a pull request from your forked repository to
the bandframework/Taweret
repository, develop
branch.
Note : You do not have to add or commit anything in
the Taweret/docs/build
folder.