This repository contains the EnMAP-Box Documentation hosted in https://enmap-box.readthedocs.io
The packages in requirements.txt need to be installed:
pip install --upgrade --user -r https://raw.githubusercontent.com/EnMAP-Box/enmap-box-documentation/main/requirements.txt
Maintenance scripts in /scripts may require additional packages from PyQGIS and the EnMAP-Box source code.
They may require that:
-
a PyQGIS environment is available, i.e. you can run
import qgis -
the EnMAP-Box source code repository (
enmap-box) is eithera) installed into the same folder
<repositories>/enmap-box /enmap-box-documentationor
b) specified by the environmental variable
ENMAPBOX_REPO=<repositories>/enmap-box
The main branch contains corresponds to the develop branch of the EnMAP-Box source code (
will be changed to main after the EnMAP-Box source code to github.)
Release branches, e.g. release_3.10 contain the documentation related to the corresponding EnMAP-Box versions
as they are released in the QGIS plugin repository.
| Folder | Content |
|---|---|
| source | Documentation files (*.rst) |
| scripts | Maintenance scripts, e.g. to generate *.rst files |
| snippets | Python snippets, e.g. to create widgets for screenshots |
Everyone can contribute to this documentation using git pull-requests. If you never have used git before, we recommend to read a basic git tutorial first, e.g. https://rogerdudler.github.io/git-guide/ or https://github.com/git-guides.
-
Create a fork of this repository (hereafter referred as
enmap-box-documentation-fork). -
Clone & checkout your fork on your local computer:
- https:
git clone https://github.com/mygithubaccount/enmap-box-documentation-fork.git - ensure that the packages in
requirements.txtare installed to your python environment, e.g. runningpython -m pip install -r requirements.txt
- https:
-
Change the EnMAP-Box documentation.
- E.g. add a new tutorial
*.rstfiles to/source/usr_section/application_tutorials - It is recommended to use a proper IDE like PyCharm or text editor for your modifications
- E.g. add a new tutorial
-
Inspect your changes in a browser:
- run (linux)
make html, or (windows)make.bat htmlto create the webpage's html files tobuild/html - start a local server that hosts the html files:
Windows:
python -m http.server build\htmlLinux:python -m http.server build/html - open the webpage in your local browser using the URL http://localhost:8000/
- run (linux)
-
Commit your changes with message that describe what you have done, e.g.
added tutorial XYorcorrected typos. -
Push your changes to your remote repository
https://github.com/mygithubaccount/enmap-box-documentation-fork.git -
Repeat the previous steps if you need to add further modifications
-
When done, publish your modifications in the official EnMAP-Box documentation creating a pull request.
- open a bash shell and run
./scripts/create_docs.sh(windows/linux bash shell), or - run (linux)
make html, or (windows)make.bat html, or - run
sphinx-autobuild
Substitute allow you to "recycle" code definitions
- Define a substitute in
source/substitutions_manual.txt. E.g. write.. |my_icon| image:: img/icons/myicon.png - Use ``|my_icon|` in any *.rst file you like.
- Run
python scripts/create_substitutes.pyto append the|my_icon|to any *.rst file where it is used - Run
make.bat htmlto build the documentation.