Skip to content

Commit a26324d

Browse files
jennyhicksonjames-bruten-moyaswant
authored
Rewrite all working practices for git and GitHub (#497)
Co-authored-by: James Bruten <109733895+james-bruten-mo@users.noreply.github.com> Co-authored-by: Yaswant Pradhan <2984440+yaswant@users.noreply.github.com>
1 parent 5780dcb commit a26324d

File tree

140 files changed

+8582
-3945
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+8582
-3945
lines changed

.github/workflows/publish_wps.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ on:
44
push:
55
branches:
66
- main
7+
- github_wps
78
pull_request:
8-
types: [opened,reopened,review_requested]
9+
types: [opened, reopened, synchronize]
910
workflow_dispatch:
1011

1112
permissions:
@@ -20,18 +21,23 @@ jobs:
2021
run: |
2122
git config --global user.email "umsysteam@metoffice.gov.uk"
2223
git config --global user.name "SSD Developers"
24+
2325
- name: Check out source
2426
uses: actions/checkout@v4
25-
- uses: actions/setup-python@v5
27+
28+
- name: Setup uv
29+
uses: astral-sh/setup-uv@v6
2630
with:
27-
python-version: '3.x'
31+
python-version: '3.12'
32+
2833
- name: Install Dependencies
29-
run: |
30-
pip install -r .github/workflows/requirements.txt
34+
run: uv sync
3135

32-
- name: build docs
33-
run: |
34-
make clean html
36+
- name: Lint Docs
37+
run: uv run sphinx-lint source
38+
39+
- name: Build Docs
40+
run: uv run make clean html
3541

3642
- name: commit docs to gh-pages branch
3743
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}

.github/workflows/requirements.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
Sphinx==6.2.1
2-
sphinx-design==0.5.0
3-
pydata-sphinx-theme
4-
sphinx-sitemap
1+
sphinx==8.2.3
2+
pydata-sphinx-theme==0.16.1
3+
sphinx-design==0.6.1
4+
sphinx-copybutton==0.5.2
5+
sphinx-lint==1.0.0
6+
sphinx-sitemap==2.8.0
7+
sphinxcontrib-svg2pdfconverter==1.3.0
8+

.gitignore

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
#build output
2-
/build/
3-
4-
#IDE files
5-
/.idea
6-
/.venv/
7-
/venv/
1+
*.egg-info/
2+
*.py[cod]
3+
.idea
4+
.venv/
5+
__pycache__/
6+
build/
7+
uv.lock
8+
venv/

README.md

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,61 @@
11
# Simulation Systems
22

3-
This repository contains documentation that is common across the many simulation and modelling codes owned by the Met Office.
3+
This repository contains documentation that is common across the many
4+
[simulation and modelling repositories](https://github.com/MetOffice/simulation-systems/wiki)
5+
owned by the Met Office.
46

5-
To build this documentation from the top level of the project run:
7+
## Build the documentation
8+
9+
A quick and clean way to get the package dependencies is via
10+
[uv](https://docs.astral.sh/uv/) package manager.
11+
12+
Ps: Optional system dependencies for PDF generation may require LaTeX
13+
distributions and other third-party libraries.
14+
15+
### using uv
16+
17+
```shell
18+
git clone https://github.com/MetOffice/simulation-systems
19+
cd simulation-systems
20+
21+
# Install dependencies (see pyproject.toml) in project .venv
22+
uv sync
23+
uv run make clean html
24+
25+
# Verify documentation
26+
firefox build/html/index.html
27+
```
28+
29+
### using pip
30+
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:
34+
35+
```shell
36+
cd simulation-systems
37+
38+
</path/to/python3.11+> -m venv .venv
39+
source .venv/bin/activate
40+
pip install .
41+
make clean html
642
```
43+
44+
### using conda
45+
46+
```shell
747
conda env create -f env.yml
848
conda activate sphinx_doc_env
949
make clean html
1050
firefox build/html/index.html
1151
```
1252

13-
The documentation is written in sphinx markup. To develop changes to this
53+
## Contributing
54+
55+
The documentation is written in sphinx markup. To develop changes to this
1456
documentation first create an issue detailing the changes that are required.
1557
Then create a branch in a clone of this repository, linking it to your issue and
16-
regularly building your changes as described above.
58+
regularly building your changes as described above.
1759

18-
Once happy with your development create a pull request and request a review
19-
from MetOffice/ssdteam.
60+
Once happy with your development create a pull request and request a review from
61+
[MetOffice/ssdteam](https://github.com/orgs/MetOffice/teams/ssdteam).

pyproject.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[project]
2+
name = "simulation-systems"
3+
version = "0.1.0"
4+
description = "Simulation Systems Working Practices"
5+
readme = "README.md"
6+
requires-python = ">=3.11"
7+
dependencies = [
8+
"pydata-sphinx-theme==0.16.1",
9+
"sphinx==8.2.3",
10+
"sphinx-design==0.6.1",
11+
"sphinx-copybutton==0.5.2",
12+
"sphinx-lint==1.0.0",
13+
"sphinx-sitemap==2.8.0",
14+
"sphinxcontrib-svg2pdfconverter==1.3.0",
15+
]

0 commit comments

Comments
 (0)