-
Notifications
You must be signed in to change notification settings - Fork 29
Migrate user_guide from jules-lsm.github.io #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Jenny Hickson (jennyhickson)
merged 3 commits into
MetOffice:main
from
yaswant:migrate-doc-2
Nov 26, 2025
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| name: User Guide | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| types: [opened, reopened, synchronize] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| jobs: | ||
| build-and-deploy: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
| env: | ||
| PYTHON_VRSN: '3.13' | ||
| VENV_PATH: 'doc/.venv' | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup uv with Python ${{ env.PYTHON_VRSN }} | ||
| uses: astral-sh/setup-uv@v7 | ||
| with: | ||
| python-version: ${{ env.PYTHON_VRSN }} | ||
|
|
||
| - name: Cache uv venv | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ${{ env.VENV_PATH }} | ||
| key: ${{ runner.os }}-uv-${{ env.PYTHON_VRSN }}-${{ hashFiles('pyproject.toml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-uv-${{ env.PYTHON_VRSN }}- | ||
|
|
||
| - name: Install dependencies | ||
| working-directory: ./doc | ||
| run: uv sync | ||
|
|
||
| - name: Lint Sphinx docs | ||
| working-directory: ./doc | ||
| run: uv run sphinx-lint source | ||
|
|
||
| - name: Build HTML docs | ||
| working-directory: ./doc | ||
| run: uv run make clean html | ||
|
|
||
| - name: Minimize uv cache | ||
| run: uv cache prune --ci | ||
|
|
||
| # -- Deploy to GitHub Pages only on push to upstream main | ||
| - name: Setup GitHub Pages | ||
| if: ${{ github.ref_name == 'main' && (github.event_name == 'push' || github.event_name == 'merge_group') }} | ||
| uses: actions/configure-pages@v5 | ||
|
|
||
| - name: Upload artifact to GitHub Pages | ||
| if: ${{ github.ref_name == 'main' && (github.event_name == 'push' || github.event_name == 'merge_group') }} | ||
| uses: actions/upload-pages-artifact@v4 | ||
| with: | ||
| name: github-pages | ||
| path: doc/build/html | ||
| retention-days: 1 | ||
|
|
||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| if: ${{ github.ref_name == 'main' && (github.event_name == 'push' || github.event_name == 'merge_group') }} | ||
| uses: actions/deploy-pages@v4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| *~ | ||
| __pycache__/ | ||
| results/*.png | ||
| results/*.txt | ||
| processed_data/*.dat | ||
| .*.sw? | ||
|
|
||
| # ignore build output | ||
| *build/ | ||
| *_build/ | ||
| user_guide/doc/_build | ||
| user_guide/doc/build | ||
|
|
||
| # ignore VS Code files | ||
| /.idea | ||
|
|
||
| # ignore envs | ||
| .env | ||
| .venv | ||
| env/ | ||
| venv/ | ||
| ENV/ | ||
| env.bak/ | ||
| venv.bak/ | ||
|
|
||
| # UV | ||
| *uv.lock | ||
| .python-version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # JULES - Joint UK Land Environment Simulator | ||
|
|
||
| The Joint UK Land Environment Simulator (JULES) is a computer model that | ||
| simulates many soil and vegetation processes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Minimal makefile for Sphinx documentation | ||
| # | ||
|
|
||
| # You can set these variables from the command line, and also | ||
| # from the environment for the first two. | ||
| SPHINXOPTS ?= | ||
| SPHINXBUILD ?= sphinx-build | ||
| SOURCEDIR = source | ||
| BUILDDIR = build | ||
|
|
||
| REPO := $(notdir $(shell git rev-parse --show-toplevel)) | ||
| BRANCH := $(shell git rev-parse --abbrev-ref HEAD) | ||
| DEPLOYDIR = $(HOME)/public_html | ||
|
|
||
| # Put it first so that "make" without argument is like "make help". | ||
| help: | ||
| @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
|
||
| .PHONY: help Makefile | ||
|
|
||
| # Catch-all target: route all unknown targets to Sphinx using the new | ||
| # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
| %: Makefile | ||
| @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
|
||
| deploy: | ||
| @$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(DEPLOYDIR)/$(REPO)/$(BRANCH)" $(SPHINXOPTS) $(O) | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # Building the JULES User Guide | ||
|
|
||
| This README describes how to build the JULES User Guide. | ||
|
|
||
| For first time users, please create a virtual environment to build the docs. | ||
|
|
||
| From the `jules/doc` folder of the repository run: | ||
|
|
||
| ```sh | ||
| conda env create -f environment.yml | ||
| ``` | ||
|
|
||
| Activate the environment: | ||
|
|
||
| ```sh | ||
| conda activate jules-user-guide | ||
| ``` | ||
|
|
||
| Build the documentation: | ||
|
|
||
| ```sh | ||
| make clean html | ||
| ``` | ||
|
|
||
| View the documentation: | ||
|
|
||
| ```sh | ||
| firefox build/html/index.html | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| name: jules-user-guide | ||
|
|
||
| channels: | ||
| - conda-forge | ||
|
|
||
| dependencies: | ||
| - python=3.13.2 | ||
| - doc8>=2.0.0 | ||
| - sphinx-lint==1.0.1 | ||
| - sphinx==8.2.3 | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| @ECHO OFF | ||
|
|
||
| pushd %~dp0 | ||
|
|
||
| REM Command file for Sphinx documentation | ||
|
|
||
| if "%SPHINXBUILD%" == "" ( | ||
| set SPHINXBUILD=sphinx-build | ||
| ) | ||
| set SOURCEDIR=source | ||
| set BUILDDIR=build | ||
|
|
||
| if "%1" == "" goto help | ||
|
|
||
| %SPHINXBUILD% >NUL 2>NUL | ||
| if errorlevel 9009 ( | ||
| echo. | ||
| echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
| echo.installed, then set the SPHINXBUILD environment variable to point | ||
| echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
| echo.may add the Sphinx directory to PATH. | ||
| echo. | ||
| echo.If you don't have Sphinx installed, grab it from | ||
| echo.https://www.sphinx-doc.org/ | ||
| exit /b 1 | ||
| ) | ||
|
|
||
| %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
| goto end | ||
|
|
||
| :help | ||
| %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
|
|
||
| :end | ||
| popd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| [project] | ||
| name = "jules" | ||
| version = "0.1.0" | ||
| description = "Add your description here" | ||
| readme = "README.md" | ||
| requires-python = ">=3.13" | ||
| dependencies = [ | ||
| "doc8>=2.0.0", | ||
| "sphinx==8.2.3", | ||
| "sphinx-lint==1.0.1", | ||
| ] | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.