A repository for the Sheffield HPC documentation
Clone or download
willfurnass Merge pull request #837 from willfurnass/com-32c-nodes
ShARC: add page on COM 32c nodes
Latest commit 4a5aedb Oct 18, 2018

README.rst

https://travis-ci.org/rcgsheffield/sheffield_hpc.svg?branch=master

Sheffield High Performance Computing Documentation

This is the source code for the documentation of Sharc and Iceberg, The University of Sheffield's High Performance Computing clusters. It is written in the rst format.

For a guide on the rst file format see this document.

Rendered Documentation

Two versions of the documentation are currently automatically built from this repository:

How to Contribute

To contribute to this documentation, first you have to fork it on GitHub and clone it to your machine, see Fork a Repo for the GitHub documentation on this process.

Once you have the git repository locally on your computer, you will need to install sphinx and sphinx_bootstrap_theme to be able to build the documentation. See the instructions below for how to achieve this.

Once you have made your changes and updated your Fork on GitHub you will need to Open a Pull Request. All changes to the repository should be made through Pull Requests, including those made by the people with direct push access.

Building the documentation on a local Windows machine

  1. Install Python 3.6 on your machine by downloading and running the Miniconda for Python 3.6 installer:

    • Install for just you;
    • Install to the default location (e.g. C:\Users\myusername\Miniconda3);
    • Do not add Anaconda to your PATH environment variable;
    • Do not register Anaconda as your default Python 3.6.
  2. Click Start -> Anaconda3 (64-bit) -> Anaconda Prompt to open a terminal window.

  3. Create a new conda environment for building the documentation by running the following from this window:

    conda create -n sheffield_hpc python=3.6
    pip install -r requirements.txt
    
  4. To build the HTML documentation run:

    make html
    

    Or if you don't have the make utility installed on your machine then build with sphinx directly:

    sphinx-build . ./html
    
  5. If you want to build the PDF documentation you will need:

    Then from the command line, the following will build the .pdf file:

    make latexpdf
    

    On first run, MikTeX will prompt you to install various extra LaTeX packages.

Building the documentation on a local Linux machine

  1. Ensure Python 3 (ideally Python 3.6) is installed.

  2. Create a virtual environment to install sphinx into:

    mkdir -m 700 ~/.venvs
    python3 -m venv ~/.venvs/sheffield_hpc_py3
    source ~/.venvs/sheffield_hpc_py3/bin/activate
    
  3. Install the Python packages needed to build the HTML documentation:

    pip3 install -r requirements.txt
    
  4. Build the documentation:

    make html
    

Building the documentation on a local Mac machine

  1. Ensure Python 3 (ideally Python 3.6) is installed. If you do not already have a python distribution installed, we recommend you install Miniconda for Python 3.6.

  2. Install the Python packages needed to build the HTML documentation. If you are using (mini)conda create a new conda environment for building the documentation by running:

    export PATH=${HOME}/miniconda3/bin:$PATH
    conda create -n sheffield_hpc python=3.6
    pip install -r requirements.txt
    

    If you are not using (mini)conda to provide Python 3:

    mkdir -m 700 ~/.venvs
    python3 -m venv ~/.venvs/sheffield_hpc_py3
    source ~/.venvs/sheffield_hpc_py3/bin/activate
    pip3 install --requirement requirements.txt
    
  3. To build the HTML documentation run:

    make html
    

Continuous build and serve

The package sphinx-autobuild provides a watcher that automatically rebuilds the site as files are modified. To use it, install (in addition to the Sphinx packages) with the following:

pip install sphinx-autobuild

To start the autobuild process, run:

make livehtml

The application also serves up the site at port 8000 by default at http://localhost:8000.

Making Changes to the Documentation

The documentation consists of a series of reStructured Text files which have the .rst extension. These files are then automatically converted to HTMl and combined into the web version of the documentation by sphinx. It is important that when editing the files the syntax of the rst files is followed. If there are any errors in your changes the build will fail and the documentaion will not update, you can test your build locally by running make html. The easiest way to learn what files should look like is to read the rst files already in the repository.