Contributing to These Docs

Licensed under the Creative Commons Attribution 4.0 International License Git on GitHub Documentation Status Sphinx linkcheck Issue Tracker Python Version

Additions, improvements, and corrections to these docs are always welcome.

The quickest way to fix typos, etc. on existing pages is to use the Edit on GitHub link in the upper right corner of the page to get to the online editor for the page on GitHub.

For more substantial work, and to add new pages, the instructions below explain how to:

  • clone the repository from GitHub

  • build the docs with your changes locally, and preview them in Firefox or your favourite browser instead of having to push commits to GitHub to trigger a build on readthedocs.org,

Getting the Repo

Git on GitHub

Clone the MOAD documentation repository from GitHub with:

$ git clone git@github.com:UBC-MOAD/docs.git

or copy the URI (the stuff after git clone above) from the Code button on the repository page.

Note

The git clone command above assumes that your are connecting to GitHub using SSH. If it fails, please follow the instructions in our Secure Remote Access docs to set up your SSH keys and Copy Your Public ssh Key to GitHub.

Docs Build Environment

Pixi

This repository uses Pixi for package and environment management. If you don’t already have Pixi installed, please follow its installation instructions to do so.

Most commands are executed using pixi run in the docs/ directory (or a sub-directory). Dependencies will be downloaded and linked in to the working environment when you use pixi run for the first time.

To get detailed information about the environment, the packages installed in it, Pixi tasks that are defined, etc., use pixi info.

Building and Previewing the Documentation

Documentation Status

The MOAD documentation is written in reStructuredText and converted to HTML using Sphinx. Creating a Docs Build Environment as described above includes the installation of Sphinx. Building the documentation is driven by the docs/Makefile. To do a clean build of the documentation use:

$ cd docs/
$ pixi run docs

The output looks something like:

✨ Pixi task (docs): make clean html
Removing everything under '_build'...
Running Sphinx v9.1.0
loading translations [en]... done
making output directory... done
Writing evaluated template result to /media/doug/warehouse/MOAD/docs/_build/html/_static/nbsphinx-code-cells.css
loading intersphinx inventory 'moadtools' from https://ubc-moad-tools.readthedocs.io/en/latest/objects.inv ...
loading intersphinx inventory 'nemocmd' from https://nemo-cmd.readthedocs.io/en/latest/objects.inv ...
loading intersphinx inventory 'salishseacmd' from https://salishseacmd.readthedocs.io/en/latest/objects.inv ...
loading intersphinx inventory 'salishseadocs' from https://salishsea-meopar-docs.readthedocs.io/en/latest/objects.inv ...
building [mo]: targets for 0 po files that are out of date
writing output...
building [html]: targets for 30 source files that are out of date
updating environment: [new config] 30 added, 0 changed, 0 removed
reading sources... [100%] zzz_archival_docs/index
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets...
copying static files...
Writing evaluated template result to /media/doug/warehouse/MOAD/docs/_build/html/_static/language_data.js
Writing evaluated template result to /media/doug/warehouse/MOAD/docs/_build/html/_static/documentation_options.js
Writing evaluated template result to /media/doug/warehouse/MOAD/docs/_build/html/_static/basic.css
Writing evaluated template result to /media/doug/warehouse/MOAD/docs/_build/html/_static/js/versions.js
Writing evaluated template result to /media/doug/warehouse/MOAD/docs/_build/html/_static/copybutton.js
copying static files: done
copying extra files...
copying extra files: done
copying assets: done
writing output... [100%] zzz_archival_docs/index
generating indices... done
copying linked files...
copying notebooks ...
writing additional pages... search done
copying images... [100%] VSCodeSelectJupyterKernel.png
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in _build/html.

The HTML rendering of the docs ends up in docs/_build/html/. You can open the index.html file in that directory tree in your browser to preview the results of the build. To preview in Firefox from the command-line you can do:

$ firefox _build/html/index.html

If you have write access to the repository on GitHub, whenever you push changes to GitHub the documentation is automatically re-built and rendered at https://ubc-moad-docs.readthedocs.io/en/latest/.

Version Control Repository

Git on GitHub

The MOAD documentation source files are available as a Git repository at https://github.com/UBC-MOAD/docs.

Issue Tracker

Issue Tracker

Documentation tasks, bug reports, and enhancement ideas are recorded and managed in the issue tracker at https://github.com/UBC-MOAD/docs/issues.

License

Licensed under the Creative Commons Attribution 4.0 International License

The UBC EOAS MOAD Group Documentation is Copyright 2018 – present by by the EOAS MOAD group and The University of British Columbia.

It is licensed under a Creative Commons Attribution 4.0 International License.