Contributing to the documentation#
Your contributions are welcome! There are many ways to contribute to the documentation:
Identify and correct typos.
Improve the description of
PyDAPand overall the DAP model.Cookbooks! We want to know how
PyDAPand OPeNDAP are being used, i.e. what kind of questions / problems is helping solve? what is the domains of expertise?Demostrate an optimization to access patterns, i.e. a benchmark.
An
OPeNDAPURL! We want to learn more about available OPeNDAP data urls, and make them accessible to the broad community of PyDAP users. We are strong proponents ofdata democratizationandopen science, and these begin by making your dataFindable.
The documentation was built using jupyter-book, which supports different types of files. Here we use rst and ipynb (executable notebooks).
How to contribute to the documentation?#
To add/edit the documentation, we recommend you follow the previous guides on version control, forking, and branching. That said, you can follow the steps:
Navigate to the cloned repository on your local machine.
Create/activate the conda environment.
conda env create -f docs/environment.yml
conda activate pydap_docs
Note
If you already have mamba installed, you can replace all conda in the commands with mamba.
Install
pydapindevelopermode, to make sure that all notebooks are properly built. To do install in dev mode, run
pip install -e .
Create a new branch, and set its upstream and use git (see steps 3 and 4 from contributing to the code)
The documentation is now split into two source files, one in English (you can find it in:
docs/en), and one in Spanish (los puedes encontrar aquidocs/es). Depending on which version of the documentation you are contributing, you can modify the source files.Once you have made changes to the source files of the documentation (either in
docs/enordocs/es), use thebuild.shto clean and buildhtmldocumentation files (you may need to makebuild.sh1= executable withchmod +x)
cd docs
chmod +x build.sh
./build.sh
Warning
Many of the tutorial examples in the documentation require EDL Authentication via a local .netrc file. Make sure you have one with valid credentials. See Authentication
Depending on how many changes you have done to the documentation, this last step may take a while. It also depends on the type of files added to the documentation (ipynb are slower to build).
Once the build process is finished, you can inspect the locally built html files. The
build.shcreates a redirect at the base of the built html files. Thus, to open the English documentation execute
open _build/html/index.html
The redirect means that the English language version of the documentation is the default. To open the Spanish version, execute
open _build/html/es/intro.html
Warning
Make sure to check that ALL notebooks were successfully built.
Note
The documentation will have a toggle to manually switch between the English and Spanish versions.
Push all changes and create a PR.
PyDAPfollows the recommendations of keeping thesourcefiles onmain, and thebuildfiles on thegh-pagesbranch.
Note
Do not include passwords or tokens. You are only submitting source files.
Once a maintaner of
PyDAPhas approved your PR it will get merged intomain. The maintainer ofPyDAPcan publish the documentation and update thegh-pagesbranch. Broadly, the steps to publish the documentation (i.e. rebuild thegh-pagesbranch) are detailed and described here: https://jupyterbook.org/en/stable/start/publish.html.