Skip to content

Commit b768897

Browse files
committed
Initial docgen action
1 parent 0647025 commit b768897

6 files changed

Lines changed: 80 additions & 6 deletions

File tree

.github/workflows/docs.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
name: Docs
3+
4+
on: # yamllint disable-line rule:truthy
5+
push:
6+
branches:
7+
- main
8+
- 'releases/**'
9+
pull_request:
10+
types: [opened, synchronize, reopened]
11+
paths:
12+
- 'mule/docs/**'
13+
- '.github/workflows/docs.yaml'
14+
workflow_dispatch:
15+
16+
permissions: read-all
17+
18+
jobs:
19+
20+
build:
21+
runs-on: ubuntu-latest
22+
timeout-minutes: 3
23+
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
- name: Setup uv
28+
uses: astral-sh/setup-uv@v6
29+
- name: Install dependencies
30+
run: uv sync && uv pip install ./mule
31+
- name: Build docs
32+
run: uv run make clean html
33+
working-directory: ./mule/docs
34+
# - id: permissions
35+
# name: Set permissions
36+
# run: |
37+
# chmod -c -R +rX "./doc/_build/html/"
38+
- name: Upload artifacts
39+
uses: actions/upload-pages-artifact@v4
40+
with:
41+
name: github-pages
42+
path: ./mule/docs/_build/html
43+
- name: Minimize uv cache
44+
run: uv cache prune --ci
45+
46+
# Deploy job
47+
deploy:
48+
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
49+
# Add a dependency to the build job
50+
needs: build
51+
permissions:
52+
pages: write # to deploy to Pages
53+
id-token: write # to verify the deployment originates from an appropriate source
54+
# Deploy to the github-pages environment
55+
environment:
56+
name: github-pages
57+
url: ${{ steps.deployment.outputs.page_url }}
58+
# Specify runner + deployment step
59+
runs-on: ubuntu-latest
60+
steps:
61+
- name: Deploy to GitHub Pages
62+
id: deployment
63+
uses: actions/deploy-pages@v4

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12.9

mule/docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
# General information about the project.
4848
project = "Mule"
49-
copyright = "2022, UM Systems Team"
49+
copyright = "2025, Met Office"
5050

5151
# The version info for the project you're documenting, acts as replacement for
5252
# |version| and |release|, also used in various other places throughout the

mule/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# pyproject.toml
22
[build-system]
33
requires = ["setuptools >= 42.0.0", "numpy"]
4-
build-backend = "setuptools.build_meta"
4+
build-backend = "setuptools.build_meta"

mule/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def run(self):
5151
version="2024.11.1",
5252
description="Unified Model Fields File interface",
5353
author="UM Systems Team",
54-
url="https://code.metoffice.gov.uk/trac/um",
54+
url="https://github.com/metoffice/mule",
5555
cmdclass={"clean": CleanCommand},
5656
package_dir={"": "lib"},
5757
packages=[

pyproject.toml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,19 @@ name = "mule"
33
version = "2025.10.1"
44
description = "API for interacting with UM output files"
55
readme = "README.md"
6-
requires-python = ">=3.12.9"
6+
requires-python = ">=3.11"
77
dependencies = [
88
"cpplint == 2.0.2",
9-
"ruff==0.12.1",
10-
"shellcheck-py==0.10.0.1",
9+
"ruff == 0.12.1",
10+
"shellcheck-py == 0.10.0.1",
11+
"sphinx == 8.2.3",
12+
"sphinx-lint == 1.0.0",
13+
"pydata-sphinx-theme == 0.16.1",
14+
"sphinx-design == 0.6.1",
15+
"sphinx-copybutton == 0.5.2",
16+
"sphinx-lint == 1.0.0",
17+
"sphinx-sitemap == 2.8.0",
18+
"sphinxcontrib-svg2pdfconverter == 1.3.0",
19+
"numpy == 2.3.3",
20+
"six == 1.17.0",
1121
]

0 commit comments

Comments
 (0)