KPF: Pre-Observing | Observing | Post-Observing

KPF SA Training

Instrument Overview

Instrument Overview

Scheduled Calibrations

Scheduled Calibrations

Night Support

Night Support

Documentation

The documentation on the KPF web page is made using the mkdocs package with the mkdocstrings extension. The source material is in the KPFTranslator repository.

To make changes to the documentation, get the repo (i.e. git clone it), then go to the appropriate branch. I recommend editing documentation in main and edit python script code in dev and use the GitHub Pull Request tools to merge the changes. To change documentation, edit the markdown files (.md). You should commit and push the changes back to the repository when done.

To build the pages from the markdown source, you’ll need a few python packages installed locally (probably mkdocs, mkdocstrings, and mkdocstrings-python, but see the documentation for the mkdocs and mkdocstrings linked above).

The first time you build the pages locally, you’ll need to run the build_script_pages.py script. This takes the list of command line tools in the linking_table.yml file and builds a markdown page for each with the code in it which refers to the doc string in the source python. This just automates a repetitive task (letting mkdocs know which scripts to document) and only needs to be done once unless a script is added to the linking table.

Then you can build the documentation locally, this generates the html source which the web page needs. To generate the source, run mkdocs build in the directory where the configuration file (mkdocs.yml) is located.

To upload the resulting web page to Keck’s servers, first cd to the site/ sub-directory which was generated and rsync it to Keck: rsync -av * rastro@www.keck.hawaii.edu:/webFiles/www/public/realpublic/inst/kpf/