|
1 | 1 | # Simulation Systems |
2 | 2 |
|
3 | | -This repository contains documentation that is common across the many |
| 3 | +[](https://github.com/MetOffice/simulation-systems/actions/workflows/publish_wps.yaml) |
| 4 | + |
| 5 | +This repository contains the working practices documentation common to the |
| 6 | +various |
4 | 7 | [simulation and modelling repositories](https://github.com/MetOffice/simulation-systems/wiki) |
5 | 8 | owned by the Met Office. |
6 | 9 |
|
7 | | -## Build the documentation |
| 10 | +The documentation in the repository can be compiled in different ways. |
8 | 11 |
|
9 | | -A quick and clean way to get the package dependencies is via |
10 | | -[uv](https://docs.astral.sh/uv/) package manager. |
| 12 | +> [!NOTE] |
| 13 | +> Optional system dependencies for PDF generation may require LaTeX |
| 14 | +> distributions and other third-party libraries. |
11 | 15 |
|
12 | | -Ps: Optional system dependencies for PDF generation may require LaTeX |
13 | | -distributions and other third-party libraries. |
| 16 | +## Setup environment |
14 | 17 |
|
15 | | -### using uv |
| 18 | +You can set up the environment ro build and deploy the documentation using any |
| 19 | +of the following methods: |
| 20 | + |
| 21 | +### 1. Using uv |
| 22 | + |
| 23 | +A quick and clean way to get the package dependencies is via the |
| 24 | +[uv](https://docs.astral.sh/uv/) package manager. |
16 | 25 |
|
17 | 26 | ```shell |
18 | 27 | git clone https://github.com/MetOffice/simulation-systems |
19 | 28 | cd simulation-systems |
20 | 29 |
|
21 | 30 | # Install dependencies (see pyproject.toml) in project .venv |
22 | 31 | uv sync |
23 | | -uv run make clean html |
24 | | - |
25 | | -# Verify documentation |
26 | | -firefox build/html/index.html |
27 | 32 | ``` |
28 | 33 |
|
29 | | -### using pip |
| 34 | +### 2. Using pip |
30 | 35 |
|
31 | | -Alternatively, if your have Python-3.11 or higher installed (sphinx==8.2.3 |
32 | | -requirement), you can install the dependencies in a virtual environment via pip, |
33 | | -and build the documentation like: |
| 36 | +If you have Python 3.11 or higher installed (`sphinx==8.2.3` required), you can |
| 37 | +use pip: |
34 | 38 |
|
35 | 39 | ```shell |
| 40 | +git clone https://github.com/MetOffice/simulation-systems |
36 | 41 | cd simulation-systems |
37 | 42 |
|
38 | | -</path/to/python3.11+> -m venv .venv |
| 43 | +<path/to/python3.11+> -m venv .venv |
39 | 44 | source .venv/bin/activate |
40 | 45 | pip install . |
41 | | -make clean html |
42 | 46 | ``` |
43 | 47 |
|
44 | | -### using conda |
| 48 | +### 3. Using conda |
45 | 49 |
|
46 | 50 | ```shell |
| 51 | +git clone https://github.com/MetOffice/simulation-systems |
| 52 | +cd simulation-systems |
| 53 | + |
47 | 54 | conda env create -f env.yml |
48 | 55 | conda activate sphinx_doc_env |
| 56 | +``` |
| 57 | + |
| 58 | +## Build documentation |
| 59 | + |
| 60 | +```shell |
| 61 | +# For uv environment |
| 62 | +uv run make clean html |
| 63 | + |
| 64 | +# For pip or conda environments |
49 | 65 | make clean html |
50 | | -firefox build/html/index.html |
| 66 | +``` |
| 67 | + |
| 68 | +After building, the HTML documentation can be found in the `build/html/` |
| 69 | +directory of your local repository. You can open the documentation in any web |
| 70 | +browser. |
| 71 | + |
| 72 | +**Met Office users** can skip build step above and deploy the documentation |
| 73 | +directly to a predefined location: |
| 74 | +`~/public_html/simulation-systems/<branch-name>/html/` |
| 75 | + |
| 76 | +```shell |
| 77 | +uv run make clean deploy # uv env |
| 78 | +# OR |
| 79 | +make clean deploy # pip or conda env |
51 | 80 | ``` |
52 | 81 |
|
53 | 82 | ## Contributing |
54 | 83 |
|
55 | | -The documentation is written in sphinx markup. To develop changes to this |
56 | | -documentation first create an issue detailing the changes that are required. |
57 | | -Then create a branch in a clone of this repository, linking it to your issue and |
58 | | -regularly building your changes as described above. |
| 84 | +Please follow the project's [Code of Conduct](CONTRIBUTING.md) |
| 85 | + |
| 86 | +The documentation is written in Sphinx markup. To propose changes: |
| 87 | + |
| 88 | +1. Create an issue detailing the required changes. |
| 89 | +2. Create a branch in your clone of this repository, linking it to your issue. |
| 90 | +3. Regularly build your changes as described above. |
59 | 91 |
|
60 | | -Once happy with your development create a pull request and request a review from |
| 92 | +Once satisfied, create a pull request and request a review from |
61 | 93 | [MetOffice/ssdteam](https://github.com/orgs/MetOffice/teams/ssdteam). |
0 commit comments