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
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Default owners of the repository
* @metoffice/ssdteam

# Add component owners as appropriate
5 changes: 5 additions & 0 deletions .github/linters/.perlcriticrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Report slightly less severe violations (severity >= 4)
severity = 4
# Verbosity format
# filename:line:column [severity policy] message near 'string of source code that caused the violation'
verbose = %f:%l:%c [%s %p] %m near '%r'\n
Empty file added .github/linters/.python-black
Empty file.
20 changes: 20 additions & 0 deletions .github/linters/.python-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[MASTER]
# Use multiple processes to speed up Pylint.
jobs=2

[MESSAGES CONTROL]
# C0114: Missing module docstring (missing-module-docstring)
# C0116: Missing function or method docstring (missing-function-docstring)
# C0103: Constant name doesn't conform to UPPER_CASE naming style (invalid-name)
# C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
# E0401: Unable to import module (import-error)
# W0611: Unused import sphinx_rtd_theme (unused-import)
# W0622: Redefining built-in 'copyright' (redefined-builtin)
# R0801: Similar lines in 2 files
disable=C0114,C0116,C0103,C0209,E0401,W0611,W0622,R0801,

[SIMILARITIES]
# Minimum lines number of a similarity.
min-similarity-lines=4
ignore-comments=yes
ignore-docstrings=yes
13 changes: 13 additions & 0 deletions .github/linters/.ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
cache-dir = "/tmp/.ruff_cache"
line-length = 80


# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

[format]
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"

# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
1 change: 1 addition & 0 deletions .github/linters/.shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
source-path=SCRIPTDIR
32 changes: 32 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Description

## Summary

_Briefly describe the feature being introduced._

## Changes

_List the major changes made in this pull request._

## Dependency

_List dependent changes. Can use build-group logic here._

## Impact

_Discuss any potential impacts this feature may have on existing functionalities._

## Issues addressed

Resolves

_List issue(s) related to this PR._

## Coordinated merge

_Specify any coordinated merges here._


## Checklist

- [ ] I have performed a self-review of my own changes
59 changes: 59 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
# Lint/analyse code with Super-Linter.
name: Checks

on:
pull_request:
branches: [main]
push:
branches: [main, 'releases/**']
workflow_dispatch:

concurrency:
group: ${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

permissions: read-all

jobs:
check:
name: Lint
runs-on: ubuntu-latest
strategy:
max-parallel: 4
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]

permissions:
contents: read
packages: read
statuses: write

steps:
- name: Checkout current
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Super-Linter
uses: super-linter/super-linter/slim@85f7611e0f7b53c8573cca84aa0ed4344f6f6a4d # v7.2.1
env:
FILTER_REGEX_EXCLUDE: (.*[.]conf.py|pull_request_template.md|/linters/)
IGNORE_GITIGNORED_FILES: true
VALIDATE_BASH_EXEC: false
VALIDATE_JAVASCRIPT_STANDARD: false
VALIDATE_JSCPD: false
VALIDATE_MARKDOWN_PRETTIER: false
VALIDATE_PYTHON_FLAKE8: false
VALIDATE_PYTHON_ISORT: false
VALIDATE_PYTHON_MYPY: false
VALIDATE_PYTHON_PYINK: false
VALIDATE_PYTHON_PYLINT: false
VALIDATE_PYTHON_RUFF: false
VALIDATE_SHELL_SHFMT: false
VALIDATE_YAML_PRETTIER: false
VALIDATE_YAML: false
# To report GitHub Actions status checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
...