Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/cd-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: cd
on:
push:
tags:
- '**'
- '**'
jobs:
pypi:
uses: ecmwf/reusable-workflows/.github/workflows/cd-pypi.yml@v2
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@ on:
# Trigger the workflow on push to master or develop, except tag creation
push:
branches:
- 'main'
- 'develop'
- 'main'
- 'develop'
tags-ignore:
- '**'
- '**'
paths-ignore:
- "docs/**"
- "README.md"
- "docs/**"
- "README.md"
# Trigger the workflow on pull request
pull_request:
paths-ignore:
- "docs/**"
- "README.md"
- "docs/**"
- "README.md"
# Trigger the workflow manually
workflow_dispatch:
# Trigger after public PR approved for CI
pull_request_target:
types: [labeled]
paths-ignore:
- "docs/**"
- "README.md"
- "docs/**"
- "README.md"
jobs:
# Run CI including downstream packages on self-hosted runners
downstream-ci:
Expand Down
62 changes: 31 additions & 31 deletions .github/workflows/legacy-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ name: legacy-ci
on:
push:
branches:
- main
- develop
- main
- develop
tags:
- "*"
- "*"
pull_request:
branches:
- main
- develop
- main
- develop
pull_request_target:
types: [labeled]
workflow_dispatch:
Expand All @@ -24,36 +24,36 @@ jobs:
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: pre-commit/action@v3.0.0
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: pre-commit/action@v3.0.0
documentation:
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: tests/environment-unit-tests.yml
environment-name: DEVELOP
channels: conda-forge
cache-env: true
cache-env-key: ubuntu-latest-3.10
extra-specs: |
python=3.10
- name: Install package
run: |
python -m pip install --no-deps -e .
- name: Build documentation
run: |
make docs-build
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: tests/environment-unit-tests.yml
environment-name: DEVELOP
channels: conda-forge
cache-env: true
cache-env-key: ubuntu-latest-3.10
extra-specs: |
python=3.10
- name: Install package
run: |
python -m pip install --no-deps -e .
- name: Build documentation
run: |
make docs-build
10 changes: 5 additions & 5 deletions .github/workflows/notify-new-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: Notify new issue
on:
issues:
types:
- "opened"
- "opened"
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Notify new issue
uses: ecmwf/notify-teams-issue@v1
with:
incoming_webhook: ${{ secrets.MS_TEAMS_INCOMING_WEBHOOK }}
- name: Notify new issue
uses: ecmwf/notify-teams-issue@v1
with:
incoming_webhook: ${{ secrets.MS_TEAMS_INCOMING_WEBHOOK }}
10 changes: 5 additions & 5 deletions .github/workflows/notify-new-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: Notify new PR
on:
pull_request_target:
types:
- "opened"
- "opened"
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Notify new PR
uses: ecmwf/notify-teams-pr@v1
with:
incoming_webhook: ${{ secrets.MS_TEAMS_INCOMING_WEBHOOK }}
- name: Notify new PR
uses: ecmwf/notify-teams-pr@v1
with:
incoming_webhook: ${{ secrets.MS_TEAMS_INCOMING_WEBHOOK }}
93 changes: 40 additions & 53 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,54 +1,41 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace # Trailing whitespace checker
- id: end-of-file-fixer # Ensure files end in a newline
- id: check-json
- id: check-yaml # Check YAML files for syntax errors only
args: [--unsafe, --allow-multiple-documents]
- id: check-toml
# - id: check-added-large-files
- id: debug-statements # Check for debugger imports and py37+ breakpoint()
- id: mixed-line-ending
- id: no-commit-to-branch # Prevent committing to main / master
- id: check-merge-conflict # Check for files that contain merge conflict
exclude: /README\.rst$|^docs/.*\.rst$
- repo: https://github.com/psf/black
rev: 24.8.0
hooks:
- id: black
args: [--line-length=120]
- repo: https://github.com/keewis/blackdoc
rev: v0.3.8
hooks:
- id: blackdoc
additional_dependencies: [black==23.3.0]
exclude: xr_engine_profile_rst\.py
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
hooks:
- id: ruff
exclude: '(dev/.*|.*_)\.py$'
args:
- --line-length=120
- --fix
- --exit-non-zero-on-fix
- --preview
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.14
hooks:
- id: mdformat
exclude: cruft-update-template.md
- repo: https://github.com/google/yamlfmt
rev: v0.13.0
hooks:
- id: yamlfmt
- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: v1.0.0
hooks:
- id: sphinx-lint
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "v2.5.0"
hooks:
- id: pyproject-fmt
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace # Trailing whitespace checker
- id: end-of-file-fixer # Ensure files end in a newline
- id: check-json
- id: check-yaml # Check YAML files for syntax errors only
args: [--unsafe, --allow-multiple-documents]
- id: check-toml
# - id: check-added-large-files
- id: debug-statements # Check for debugger imports and py37+ breakpoint()
- id: mixed-line-ending
- id: no-commit-to-branch # Prevent committing to main / master
- id: check-merge-conflict # Check for files that contain merge conflict
exclude: /README\.rst$|^docs/.*\.rst$
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.4
hooks:
- id: ruff-check
exclude: '(dev/.*|.*_)\.py$'
args:
- --fix
- --exit-non-zero-on-fix
- id: ruff-format
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.14
hooks:
- id: mdformat
exclude: cruft-update-template.md
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.16.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --preserve-quotes]
- id: pretty-format-toml
args: [--autofix]
- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: v1.0.0
hooks:
- id: sphinx-lint
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ build:
python: "3.9"
python:
install:
- requirements: docs/requirements.txt
- requirements: docs/requirements.txt
sphinx:
configuration: docs/conf.py
2 changes: 1 addition & 1 deletion docs/examples/rotate.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
" import numpy as np\n",
" from mpl_toolkits.basemap import Basemap\n",
"\n",
" map = Basemap(projection='ortho', lat_0=lat_0, lon_0=lon_0, resolution='c')\n",
" map = Basemap(projection=\"ortho\", lat_0=lat_0, lon_0=lon_0, resolution=\"c\")\n",
" map.drawcoastlines(linewidth=0.25)\n",
" map.fillcontinents(color=(0.93, 0.93, 0.93), lake_color=(0.93, 0.93, 0.93))\n",
" map.drawmeridians(np.arange(0, 360, 10), color=\"gray\")\n",
Expand Down
38 changes: 19 additions & 19 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name: earthkit-geo
channels:
- conda-forge
- nodefaults
- conda-forge
- nodefaults
dependencies:
- pyproj
- cartopy
- shapely
- scipy
- requests
- make
- mypy
- myst-parser
- pre-commit
- pytest
- pytest-cov
- sphinx>=7.2.6
- pip:
- sphinx-autoapi>=3.0.0
- sphinx_rtd_theme
- sphinxcontrib-apidoc
- nbsphinx
- pyproj
- cartopy
- shapely
- scipy
- requests
- make
- mypy
- myst-parser
- pre-commit
- pytest
- pytest-cov
- sphinx>=7.2.6
- pip:
- sphinx-autoapi>=3.0.0
- sphinx_rtd_theme
- sphinxcontrib-apidoc
- nbsphinx
Loading
Loading