Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build-sphinx-docs.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ------------------------------------------------------------------------------
# (c) Crown copyright Met Office. All rights reserved.
# The file LICENCE, distributed with this code, contains details of the terms
# under which the code may be used.
# (c) Crown copyright Met Office. All rights reserved.
# The file LICENCE, distributed with this code, contains details of the terms
# under which the code may be used.
# ------------------------------------------------------------------------------

name: Build Sphinx Docs
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
BUILD_DIR: ${{ inputs.build-directory }}
steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Set up Python 3.12
uses: actions/setup-python@v6
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/check-cr-approved.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# ------------------------------------------------------------------------------
# (c) Crown copyright Met Office. All rights reserved.
# The file LICENCE, distributed with this code, contains details of the terms
# under which the code may be used.
# ------------------------------------------------------------------------------

name: Check CR Approval

on:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/cla-check.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# ------------------------------------------------------------------------------
# (c) Crown copyright Met Office. All rights reserved.
# The file LICENCE, distributed with this code, contains details of the terms
# under which the code may be used.
# (c) Crown copyright Met Office. All rights reserved.
# The file LICENCE, distributed with this code, contains details of the terms
# under which the code may be used.
# ------------------------------------------------------------------------------

name: CLA Checker
on:
workflow_call:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy-sphinx-docs.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ------------------------------------------------------------------------------
# (c) Crown copyright Met Office. All rights reserved.
# The file LICENCE, distributed with this code, contains details of the terms
# under which the code may be used.
# (c) Crown copyright Met Office. All rights reserved.
# The file LICENCE, distributed with this code, contains details of the terms
# under which the code may be used.
# ------------------------------------------------------------------------------

name: Deploy Sphinx Docs
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/fortran-lint.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ------------------------------------------------------------------------------
# (c) Crown copyright Met Office. All rights reserved.
# The file LICENCE, distributed with this code, contains details of the terms
# under which the code may be used.
# (c) Crown copyright Met Office. All rights reserved.
# The file LICENCE, distributed with this code, contains details of the terms
# under which the code may be used.
# ------------------------------------------------------------------------------

name: Lint
Expand Down Expand Up @@ -35,7 +35,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Setup uv and Python ${{ env.UV_PYTHON }}
uses: astral-sh/setup-uv@v7
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/label-pr.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# ------------------------------------------------------------------------------
# (c) Crown copyright Met Office. All rights reserved.
# The file LICENCE, distributed with this code, contains details of the terms
# under which the code may be used.
# ------------------------------------------------------------------------------

name: Label PR

on:
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/umdp3_fixer.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---
# ------------------------------------------------------------------------------
# (c) Crown copyright Met Office. All rights reserved.
# The file LICENCE, distributed with this code, contains details of the terms
# under which the code may be used.
# ------------------------------------------------------------------------------

name: Fix UMDP3

on:
Expand All @@ -24,18 +29,18 @@ jobs:

steps:
- name: Checkout Branch
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
path: pr_branch
token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout SimSys_Scripts
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
repository: MetOffice/SimSys_Scripts
sparse-checkout: umdp3_fixer
path: SimSys_Scripts
- name: Set up Python 3.14
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: 3.14
- name: Run UMDP3 Fixer
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# ------------------------------------------------------------------------------
# (c) Crown copyright Met Office. All rights reserved.
# The file LICENCE, distributed with this code, contains details of the terms
# under which the code may be used.
# ------------------------------------------------------------------------------

name: CI
# This workflow is used for validating code quality on growss PRs.

Expand All @@ -24,7 +30,7 @@ jobs:
UV_PYTHON: "3.14"

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- name: Setup uv
uses: astral-sh/setup-uv@v7
Expand Down
28 changes: 28 additions & 0 deletions LICENCE
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
BSD 3-Clause Licence

Crown Copyright (c) Met Office

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 changes: 15 additions & 14 deletions build-sphinx-docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ documentation from a local repository to GitHub Pages.

## Usage

To use this workflow developers must have a `requirements.txt` file to define
the sphinx dependencies that will be used by the `build-sphinx-docs` workflow.
By default the workflow will look for a `requirements.txt` file in the top
level of the calling project repository. An example of a `requirements.txt`
file which could run this workflow would be as follows:
To use this workflow developers must have a `requirements.txt` file to define
the sphinx dependencies that will be used by the `build-sphinx-docs` workflow.
By default the workflow will look for a `requirements.txt` file in the top level
of the calling project repository. An example of a `requirements.txt` file which
could run this workflow would be as follows:

### Example requirements

Expand Down Expand Up @@ -53,9 +53,10 @@ Here the user would implement this file and replace each of the parameters with
the respective data types as dictated by the inputs section of the
`build-sphinx-docs.yaml` file.

Following the calling of the `build-sphinx-docs` workflow, the `deploy-sphinx-docs`
workflow can be used to deploy the generated html documentation to the GitHub
webserver. This workflow can be called from a workflow using the form describe below:
Following the calling of the `build-sphinx-docs` workflow, the
`deploy-sphinx-docs` workflow can be used to deploy the generated html
documentation to the GitHub webserver. This workflow can be called from a
workflow using the form describe below:

### Deploy built HTML to GitHub Pages

Expand All @@ -69,10 +70,10 @@ steps:
timeout: Timeout for the job in minutes (5)
```

Both of these steps can be combined to produce a simple build and deploy documentation
pipeline for a repository:
Both of these steps can be combined to produce a simple build and deploy
documentation pipeline for a repository:

### Example continuous intergration pipeline in an external repository
### Example continuous integration pipeline in an external repository

An example workflow to build Sphinx documentation and deploy it to GitHub Pages
when changes are pushed to the `main` branch:
Expand All @@ -92,9 +93,9 @@ jobs:
requirements: /path/to/requirements.txt
runner: ubuntu-24.04
timeout: 10
docs-directory: '/path/to/documentation'
sphinx-opts: 'extra options'
build-directory: '/path/to/build/html'
docs-directory: "/path/to/documentation"
sphinx-opts: "extra options"
build-directory: "/path/to/build/html"

deploy-docs:
if: github.ref == 'refs/heads/main'
Expand Down
25 changes: 25 additions & 0 deletions check-cr-approved/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Check CR Approved Action

This action checks that a code reviewer has been assigned to a pull request (via
the pr template) and then checks that that user has approved the PR, failing if
not. This is to prevent sci tech reviewers accidentally merging without the
review process being finalised. The intention is for this to be bypassable so it
just acts as a reminder and removes the green commit button before we're ready
for it.

## Usage

```yaml
name: Check CR approved

on:
pull_request:
types: [opened, synchronize, reopened, edited]
pull_request_review:
types: [submitted, edited, dismissed]
workflow_dispatch:

jobs:
check_cr_approved:
uses: MetOffice/growss/.github/workflows/check-cr-approved.yaml@main
```
27 changes: 0 additions & 27 deletions check_cr_approved/README.md

This file was deleted.

13 changes: 6 additions & 7 deletions cla_check/README.md → cla-check/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ username to the CONTRIBUTORS file in that repository.
name: CLA Check

on:
pull_request_target:
pull_request_target:

jobs:
cla_check:
uses: MetOffice/growss/.github/workflows/cla-check.yaml@main

# Optional
with:
runner: 'ubuntu-24.04'
cla_check:
uses: MetOffice/growss/.github/workflows/cla-check.yaml@main
# Optional
with:
runner: "ubuntu-24.04"
```
37 changes: 20 additions & 17 deletions fortran-lint/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# Fortran Linting workflow (using Fortitude)

This reusable workflow serves as a a generic workflow to lint fortran
code using the fortitude linter.
This reusable workflow serves as a a generic workflow to lint fortran code using
the fortitude linter.

## Usage

By default this workflow will check all the rules included in fortitude linter.
However, should you wish to check only a certain set of rules in your local repository
you can do this by implementing a `fortitude.toml` file in the top-level/root directory
of your local repository, defining the rules which should be checked when running this
reusable workflow from a caller workflow. The following toml file is an example of
what your `fortitude.toml` file could look like:
However, should you wish to check only a certain set of rules in your local
repository you can do this by implementing a `fortitude.toml` file in the
top-level/root directory of your local repository, defining the rules which
should be checked when running this reusable workflow from a caller workflow.
The following toml file is an example of what your `fortitude.toml` file could
look like:

### Example fortitude configuration

Expand All @@ -21,8 +22,8 @@ ignore = ["S001", "S051"]
line-length = 132
```

In order to use this reusable workflow you should implement a calling workflow as
a YAML file in your `.github/workflows` directory containing the follwing:
In order to use this reusable workflow you should implement a calling workflow
as a YAML file in your `.github/workflows` directory containing the follwing:

### Example usage in caller workflow

Expand All @@ -32,15 +33,17 @@ steps:
uses: MetOffice/growss/.github/workflows/fortan-lint.yaml@main

with:
runner: The runner to use for the job (ubuntu-latest)
timeout: The maximum time in minutes the job can run for (10)
python-version: The Python version to use (3.14)
runner: The runner to use for the job (ubuntu-latest)
timeout: The maximum time in minutes the job can run for (10)
python-version: The Python version to use (3.14)
```

Where runner,timeout and python-version are all appropriately defined inputs
to the workflow as defined in `MetOffice/growss/.github/workflows/fortan-lint.yaml`
Where runner,timeout and python-version are all appropriately defined inputs to
the workflow as defined in `MetOffice/growss/.github/workflows/fortan-lint.yaml`

### Further details
Fortitude is a fortran linter developed and maintained by PlasmaFAIR. For further details on
how to configure your `fortitude.toml` file and how to interpret error messages given by this
reusable workflow please refer to the [fortitude doumentation](https://fortitude.readthedocs.io/en/latest/)

Fortitude is a fortran linter developed and maintained by PlasmaFAIR. For
further details on how to configure your `fortitude.toml` file and how to
interpret error messages given by this reusable workflow please refer to the
[fortitude doumentation](https://fortitude.readthedocs.io/en/latest/)
6 changes: 6 additions & 0 deletions labeler/action.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# ------------------------------------------------------------------------------
# (c) Crown copyright Met Office. All rights reserved.
# The file LICENCE, distributed with this code, contains details of the terms
# under which the code may be used.
# ------------------------------------------------------------------------------

name: Labeler
description: A GitHub action to manage Issue/PR labels
inputs:
Expand Down
23 changes: 23 additions & 0 deletions umdp3-fixer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# UMDP3 Fixer Action

This action runs the UMDP3 fixer script stored in
[MetOffice/SimSys_Scripts](https://github.com/MetOffice/SimSys_Scripts).

## Usage

```yaml
name: umdp3 Fixer

on:
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:

jobs:
umdp3_fixer:
uses: MetOffice/growss/.github/workflows/umdp3_fixer.yaml@main
# Optional non default inputs
with:
runner: "ubuntu-latest"
timeout: 15
```
Loading
Loading