Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
34 changes: 17 additions & 17 deletions .github/ci-hpc-config.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
build:
modules:
- ninja
- ninja
dependencies:
- ecmwf/ecbuild@develop
- MathisRosenhauer/libaec@refs/tags/v1.1.3
- ecmwf/eccodes@develop
- ecmwf/eckit@develop
- ecmwf/odc@develop
- ecmwf/metkit@develop
- ecmwf/fdb@develop
- ecmwf/ecbuild@develop
- MathisRosenhauer/libaec@refs/tags/v1.1.3
- ecmwf/eccodes@develop
- ecmwf/eckit@develop
- ecmwf/odc@develop
- ecmwf/metkit@develop
- ecmwf/fdb@develop
python_dependencies:
- ecmwf/eccodes-python@develop
- ecmwf/cfgrib@master
- ecmwf/pdbufr@master
- ecmwf/pyodc@develop
- ecmwf/pyfdb@develop
- ecmwf/earthkit-utils@develop
- ecmwf/eccodes-python@develop
- ecmwf/cfgrib@master
- ecmwf/pdbufr@master
- ecmwf/pyodc@develop
- ecmwf/pyfdb@develop
- ecmwf/earthkit-utils@develop
env:
- ECCODES_SAMPLES_PATH=$ECCODES_DIR/share/eccodes/samples
- ECCODES_DEFINITION_PATH=$ECCODES_DIR/share/eccodes/definitions
- GITHUB_WORKFLOW=anything
- ECCODES_SAMPLES_PATH=$ECCODES_DIR/share/eccodes/samples
- ECCODES_DEFINITION_PATH=$ECCODES_DIR/share/eccodes/definitions
- GITHUB_WORKFLOW=anything
parallel: 64
requirements: tests/downstream-ci-requirements.txt
pytest_cmd: |
Expand Down
32 changes: 16 additions & 16 deletions .github/ci-hpc-gpu-config.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
build:
modules:
- ninja
- ninja
dependencies:
- ecmwf/ecbuild@develop
- MathisRosenhauer/libaec@refs/tags/v1.1.3
- ecmwf/eccodes@develop
- ecmwf/eckit@develop
- ecmwf/odc@develop
- ecmwf/metkit@develop
- ecmwf/fdb@develop
- ecmwf/ecbuild@develop
- MathisRosenhauer/libaec@refs/tags/v1.1.3
- ecmwf/eccodes@develop
- ecmwf/eckit@develop
- ecmwf/odc@develop
- ecmwf/metkit@develop
- ecmwf/fdb@develop
python_dependencies:
- ecmwf/eccodes-python@develop
- ecmwf/cfgrib@master
- ecmwf/pdbufr@master
- ecmwf/pyodc@develop
- ecmwf/pyfdb@develop
- ecmwf/earthkit-utils@develop
- ecmwf/eccodes-python@develop
- ecmwf/cfgrib@master
- ecmwf/pdbufr@master
- ecmwf/pyodc@develop
- ecmwf/pyfdb@develop
- ecmwf/earthkit-utils@develop
env:
- ECCODES_SAMPLES_PATH=$ECCODES_DIR/share/eccodes/samples
- ECCODES_DEFINITION_PATH=$ECCODES_DIR/share/eccodes/definitions
- ECCODES_SAMPLES_PATH=$ECCODES_DIR/share/eccodes/samples
- ECCODES_DEFINITION_PATH=$ECCODES_DIR/share/eccodes/definitions
parallel: 64
queue: ng
gpus: 1
Expand Down
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:
deploy:
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
18 changes: 9 additions & 9 deletions .github/workflows/nightly-hpc-gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ on:
workflow_dispatch:
# Run at 04:00 UTC every day (on default branch)
schedule:
- cron: "0 04 * * *"
- cron: "0 04 * * *"
jobs:
test-hpc-gpu:
runs-on: [self-hosted, linux, hpc]
steps:
- uses: ecmwf/reusable-workflows/ci-hpc@v2
with:
github_user: ${{ secrets.BUILD_PACKAGE_HPC_GITHUB_USER }}
github_token: ${{ secrets.GH_REPO_READ_TOKEN }}
troika_user: ${{ secrets.HPC_CI_TESTING_SSH_USER }}
repository: ecmwf/earthkit-data@${{ github.event.pull_request.head.sha || github.sha }}
build_config: .github/ci-hpc-gpu-config.yml
python_version: "3.10"
- uses: ecmwf/reusable-workflows/ci-hpc@v2
with:
github_user: ${{ secrets.BUILD_PACKAGE_HPC_GITHUB_USER }}
github_token: ${{ secrets.GH_REPO_READ_TOKEN }}
troika_user: ${{ secrets.HPC_CI_TESTING_SSH_USER }}
repository: ecmwf/earthkit-data@${{ github.event.pull_request.head.sha || github.sha }}
build_config: .github/ci-hpc-gpu-config.yml
python_version: "3.10"
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: '(docs/conf|dev/.*|.*_)\.py$|docs/experimental/.*\.ipynb$|polytope_feature\.ipynb$'
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
6 changes: 3 additions & 3 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ build:
python: "3.10"
python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
- requirements: docs/requirements.txt
- method: pip
path: .
sphinx:
configuration: docs/conf.py
31 changes: 17 additions & 14 deletions docs/examples/bufr_synop.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,7 @@
}
],
"source": [
"df = ds.to_pandas(columns=[\"latitude\", \"longitude\", \n",
" \"heightOfStation\", \"airTemperatureAt2M\"])\n",
"df = ds.to_pandas(columns=[\"latitude\", \"longitude\", \"heightOfStation\", \"airTemperatureAt2M\"])\n",
"df"
]
},
Expand Down Expand Up @@ -576,9 +575,10 @@
}
],
"source": [
"df = ds.to_pandas(columns=[\"latitude\", \"longitude\", \n",
" \"heightOfStation\", \"airTemperatureAt2M\", \"WMO_station_id\"],\n",
" filters={\"WMO_station_id\": [30846, 89514]})\n",
"df = ds.to_pandas(\n",
" columns=[\"latitude\", \"longitude\", \"heightOfStation\", \"airTemperatureAt2M\", \"WMO_station_id\"],\n",
" filters={\"WMO_station_id\": [30846, 89514]},\n",
")\n",
"df"
]
},
Expand Down Expand Up @@ -662,9 +662,10 @@
}
],
"source": [
"df = ds.to_pandas(columns=[\"latitude\", \"longitude\", \n",
" \"heightOfStation\", \"airTemperatureAt2M\"],\n",
" filters={\"airTemperatureAt2M\": slice(None, 290)})\n",
"df = ds.to_pandas(\n",
" columns=[\"latitude\", \"longitude\", \"heightOfStation\", \"airTemperatureAt2M\"],\n",
" filters={\"airTemperatureAt2M\": slice(None, 290)},\n",
")\n",
"df"
]
},
Expand Down Expand Up @@ -756,9 +757,10 @@
}
],
"source": [
"df = ds.to_pandas(columns=[\"latitude\", \"longitude\", \n",
" \"heightOfStation\", \"airTemperatureAt2M\"],\n",
" filters={\"airTemperatureAt2M\": slice(290, 300)})\n",
"df = ds.to_pandas(\n",
" columns=[\"latitude\", \"longitude\", \"heightOfStation\", \"airTemperatureAt2M\"],\n",
" filters={\"airTemperatureAt2M\": slice(290, 300)},\n",
")\n",
"df"
]
},
Expand Down Expand Up @@ -842,9 +844,10 @@
}
],
"source": [
"df = ds.to_pandas(columns=[\"latitude\", \"longitude\", \n",
" \"heightOfStation\", \"airTemperatureAt2M\"],\n",
" filters={\"airTemperatureAt2M\": slice(300, None)})\n",
"df = ds.to_pandas(\n",
" columns=[\"latitude\", \"longitude\", \"heightOfStation\", \"airTemperatureAt2M\"],\n",
" filters={\"airTemperatureAt2M\": slice(300, None)},\n",
")\n",
"df"
]
},
Expand Down
5 changes: 3 additions & 2 deletions docs/examples/bufr_temp.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1159,8 +1159,9 @@
}
],
"source": [
"df = ds.to_pandas(columns=(\"WMO_station_id\", \"data_datetime\", \"pressure\", \"airTemperature\"),\n",
" filters={\"WMO_station_id\": 1415})\n",
"df = ds.to_pandas(\n",
" columns=(\"WMO_station_id\", \"data_datetime\", \"pressure\", \"airTemperature\"), filters={\"WMO_station_id\": 1415}\n",
")\n",
"df"
]
},
Expand Down
6 changes: 2 additions & 4 deletions docs/examples/cache.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,7 @@
}
],
"source": [
"s = {\"cache-policy\": \"off\", \n",
" \"temporary-directory-root\": \"~/my_demo_tmp\"}\n",
"s = {\"cache-policy\": \"off\", \"temporary-directory-root\": \"~/my_demo_tmp\"}\n",
"config.set(s)\n",
"cache.directory()"
]
Expand Down Expand Up @@ -358,8 +357,7 @@
}
],
"source": [
"s = {\"cache-policy\": \"temporary\", \n",
" \"temporary-cache-directory-root\": \"~/my_demo_cache\"}\n",
"s = {\"cache-policy\": \"temporary\", \"temporary-cache-directory-root\": \"~/my_demo_cache\"}\n",
"config.set(s)\n",
"cache.directory()"
]
Expand Down
Loading
Loading