Skip to content
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

Updated lockfiles #2

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
c45500e
Pin ASV - airspeed-velocity/asv#1385. (#5756)
trexfeathers Feb 19, 2024
e5c2c0c
Improve ncdata and CF information on "iris heart xarray" page (#5752)
pp-mo Feb 19, 2024
e9b5b3a
Regrid docs fix (#5758)
stephenworsley Feb 20, 2024
7729d8a
Update CF standard names to v84. (#5761)
trexfeathers Feb 20, 2024
7859096
Refactor warnings from `iris.exceptions` into `iris.warnings` (#5760)
trexfeathers Feb 20, 2024
829cb08
Whats new updates for v3.8.0rc0 . (#5765)
trexfeathers Feb 21, 2024
2afc586
Merging release branch into main
trexfeathers Feb 21, 2024
8998779
Restore latest Whats New files.
trexfeathers Feb 21, 2024
2b1ca72
Merge pull request #5766 from trexfeathers/v3.8.x.mergeback
ESadek-MO Feb 21, 2024
9397c1d
Add an auto-labeller to always benchmark lock file changes (#5763)
trexfeathers Feb 22, 2024
2b024aa
Update documentation for the new v5 CLA. (#5664)
trexfeathers Feb 22, 2024
2f338b7
Bump scitools/workflows from 2024.02.0 to 2024.02.1 (#5778)
dependabot[bot] Feb 26, 2024
f4e2fb7
RUFF: fix legacy use of np.numpy.random (#5786)
tkknight Feb 27, 2024
6bc9adb
DOCS: Enable numpydoc validation pre-commit hook (#5762)
tkknight Feb 27, 2024
8c4b00d
ASV custom build command and file-based benchmark triggers (#5776)
trexfeathers Feb 27, 2024
3b0ab40
DOCS: Add whatsnew for recent PRs (#5789)
tkknight Feb 27, 2024
8e3a54a
Bump scitools/workflows from 2024.02.1 to 2024.02.2 (#5792)
dependabot[bot] Feb 29, 2024
b5a754e
whatsnew update for 3.8.0 (#5793)
stephenworsley Feb 29, 2024
586c647
Lazy rolling_window (#5775)
bouweandela Mar 1, 2024
0ef0bc5
Merge remote-tracking branch 'upstream/v3.8.x' into trial_3v8_mergeback
pp-mo Mar 1, 2024
9ac39b7
Merge pull request #5794 from pp-mo/trial_3v8_mergeback
trexfeathers Mar 1, 2024
c6151e8
Fix usage of map_blocks in AreaWeighted and elsewhere (#5767)
stephenworsley Mar 1, 2024
897b7cb
Bump scitools/workflows from 2024.02.2 to 2024.03.0
dependabot[bot] Mar 12, 2024
23c7144
Merge pull request #5818 from SciTools/dependabot/github_actions/scit…
bjlittle Mar 12, 2024
cb66b70
Bump scitools/workflows from 2024.03.0 to 2024.03.1
dependabot[bot] Mar 13, 2024
a3df32f
Merge pull request #5826 from SciTools/dependabot/github_actions/scit…
bjlittle Mar 13, 2024
e9b2e8b
Bump scitools/workflows from 2024.03.1 to 2024.03.3
dependabot[bot] Mar 14, 2024
9c431a0
Merge pull request #5835 from SciTools/dependabot/github_actions/scit…
bjlittle Mar 14, 2024
ae61baf
What's New patch.
trexfeathers Mar 4, 2024
8215b43
What's New patch.
trexfeathers Mar 4, 2024
00b3d88
Make the bugfix panel OPEN.
trexfeathers Mar 4, 2024
df70eea
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Mar 18, 2024
ece9f03
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 18, 2024
cbb0845
Merge pull request #5757 from SciTools/pre-commit-ci-update-config
bjlittle Mar 18, 2024
3b49086
Merge pull request #5857 from trexfeathers/v3.7.1.mergeback
bjlittle Mar 19, 2024
821cbb8
Merge pull request #5858 from trexfeathers/v3.8.1.mergeback
bjlittle Mar 19, 2024
b8d6ab1
Updated environment lockfiles
web-flow Mar 23, 2024
fca898d
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Mar 25, 2024
e90cce2
Merge pull request #5885 from SciTools/pre-commit-ci-update-config
bjlittle Mar 25, 2024
7c28258
Advertise structured_um_loading performance regression.
trexfeathers Mar 26, 2024
fb039ab
Merge pull request #5886 from trexfeathers/lockfile_fixes
bjlittle Mar 26, 2024
371c081
Updated lock files.
trexfeathers Mar 27, 2024
4a1439f
Merge remote-tracking branch 'upstream/main' into new_lockfiles_5740
trexfeathers Mar 27, 2024
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
9 changes: 9 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# benchmark_this automatically triggers the benchmark workflow when added by
# a user. No triggering happens when GitHub Actions adds the label (this
# avoids security vulnerabilities), so alternative triggers for the below
# files are therefore included in workflows/benchmarks_run.yml. Automatic
# labelling is still included here to make it easier to search pull requests,
# and to reinforce the culture of using this label.
benchmark_this:
- changed-files:
- any-glob-to-any-file: ['requirements/locks/*.lock', "setup.py"]
5 changes: 5 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@

---
[Consult Iris pull request check list]( https://scitools-iris.readthedocs.io/en/latest/developers_guide/contributing_pull_request_checklist.html)

---
Add any of the below labels to trigger actions on this PR:

- https://github.com/SciTools/iris/labels/benchmark_this
45 changes: 38 additions & 7 deletions .github/workflows/benchmarks_run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,46 @@ on:
required: false
type: string
pull_request:
types: [labeled]
# Add the `labeled` type to the default list.
types: [labeled, opened, synchronize, reopened]

jobs:
pre-checks:
runs-on: ubuntu-latest
if: github.repository == 'SciTools/iris'
outputs:
overnight: ${{ steps.overnight.outputs.check }}
branch: ${{ steps.branch.outputs.check }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- id: files-changed
uses: marceloprado/has-changed-path@df1b7a3161b8fb9fd8c90403c66a9e66dfde50cb
with:
# SEE ALSO .github/labeler.yml .
paths: requirements/locks/*.lock setup.py
- id: overnight
if: github.event_name != 'pull_request'
run: echo "check=true" >> "$GITHUB_OUTPUT"
- id: branch
if: >
github.event_name == 'pull_request'
&&
(
steps.files-changed.outputs.changed == 'true'
||
github.event.label.name == 'benchmark_this'
)
run: echo "check=true" >> "$GITHUB_OUTPUT"


benchmark:
if: >
github.repository == 'SciTools/iris' &&
(github.event_name != 'pull_request' ||
github.event.label.name == 'benchmark_this')
runs-on: ubuntu-latest
needs: pre-checks
if: >
needs.pre-checks.outputs.overnight == 'true' ||
needs.pre-checks.outputs.branch == 'true'

env:
IRIS_TEST_DATA_LOC_PATH: benchmarks
Expand Down Expand Up @@ -76,7 +107,7 @@ jobs:
echo "OVERRIDE_TEST_DATA_REPOSITORY=${GITHUB_WORKSPACE}/${IRIS_TEST_DATA_PATH}/test_data" >> $GITHUB_ENV

- name: Benchmark this pull request
if: ${{ github.event.label.name == 'benchmark_this' }}
if: needs.pre-checks.outputs.branch == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.number }}
Expand All @@ -85,7 +116,7 @@ jobs:

- name: Run overnight benchmarks
id: overnight
if: ${{ github.event_name != 'pull_request' }}
if: needs.pre-checks.outputs.overnight == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ concurrency:
jobs:
manifest:
name: "check-manifest"
uses: scitools/workflows/.github/workflows/ci-manifest.yml@2024.02.0
uses: scitools/workflows/.github/workflows/ci-manifest.yml@2024.03.3
15 changes: 15 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Reference
# - https://github.com/actions/labeler

name: "Pull Request Labeler"
on:
- pull_request_target

jobs:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
2 changes: 1 addition & 1 deletion .github/workflows/refresh-lockfiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ on:

jobs:
refresh_lockfiles:
uses: scitools/workflows/.github/workflows/refresh-lockfiles.yml@2024.02.0
uses: scitools/workflows/.github/workflows/refresh-lockfiles.yml@2024.03.3
secrets: inherit
9 changes: 8 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ repos:
- id: no-commit-to-branch

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.2.1"
rev: "v0.3.4"
hooks:
- id: ruff
types: [file, python]
Expand Down Expand Up @@ -61,3 +61,10 @@ repos:
hooks:
- id: sort-all
types: [file, python]

- repo: https://github.com/numpy/numpydoc
rev: v1.7.0rc0
hooks:
- id: numpydoc-validation
exclude: "^lib/iris/tests/|docs/gallery_code/"
types: [file, python]
4 changes: 4 additions & 0 deletions benchmarks/asv.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
"environment_type": "conda-delegated",
"show_commit_url": "https://github.com/scitools/iris/commit/",
"branches": ["upstream/main"],
"build_command": [
"python setup.py build",
"python -mpip wheel --no-deps -w {build_cache_dir} {build_dir}"
],

"benchmark_dir": "./benchmarks",
"env_dir": ".asv/env",
Expand Down
8 changes: 3 additions & 5 deletions benchmarks/asv_delegated_conda.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,15 @@ def __init__(

Parameters
----------
conf : Config instance

conf : Config
Config instance.
python : str
Version of Python. Must be of the form "MAJOR.MINOR".

requirements : dict
Dictionary mapping a PyPI package name to a version
identifier string.

tagged_env_vars : dict
Environment variables, tagged for build vs. non-build
Environment variables, tagged for build vs. non-build.

"""
ignored = ["`python`"]
Expand Down
15 changes: 9 additions & 6 deletions benchmarks/benchmarks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@
# This file is part of Iris and is released under the BSD license.
# See LICENSE in the root of the repository for full licensing details.
"""Common code for benchmarks."""

from os import environ
import resource

ARTIFICIAL_DIM_SIZE = int(10e3) # For all artificial cubes, coords etc.


def disable_repeat_between_setup(benchmark_object):
"""Benchmarks where object persistence would be inappropriate (decorator).
"""Benchmark where object persistence would be inappropriate (decorator).

E.g:
* Benchmarking data realisation
* Benchmarking Cube coord addition

* Benchmarking data realisation
* Benchmarking Cube coord addition

Can be applied to benchmark classes/methods/functions.

Expand Down Expand Up @@ -107,14 +109,15 @@ def _wrapper(*args, **kwargs):


def on_demand_benchmark(benchmark_object):
"""Disables these benchmark(s) unless ON_DEMAND_BENCHARKS env var is set.
"""Disable these benchmark(s) unless ON_DEMAND_BENCHARKS env var is set.

This is a decorator.

For benchmarks that, for whatever reason, should not be run by default.
E.g:
* Require a local file
* Used for scalability analysis instead of commit monitoring.

* Require a local file
* Used for scalability analysis instead of commit monitoring.

Can be applied to benchmark classes/methods/functions.

Expand Down
1 change: 1 addition & 0 deletions benchmarks/benchmarks/cperf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
Files available from the UK Met Office:
moo ls moose:/adhoc/projects/avd/asv/data_for_nightly_tests/
"""

import numpy as np

from iris import load_cube
Expand Down
1 change: 1 addition & 0 deletions benchmarks/benchmarks/cperf/equality.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# This file is part of Iris and is released under the BSD license.
# See LICENSE in the root of the repository for full licensing details.
"""Equality benchmarks for the CPerf scheme of the UK Met Office's NG-VAT project."""

from .. import on_demand_benchmark
from . import SingleDiagnosticMixin

Expand Down
1 change: 1 addition & 0 deletions benchmarks/benchmarks/cperf/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# This file is part of Iris and is released under the BSD license.
# See LICENSE in the root of the repository for full licensing details.
"""File loading benchmarks for the CPerf scheme of the UK Met Office's NG-VAT project."""

from .. import on_demand_benchmark
from . import SingleDiagnosticMixin

Expand Down
3 changes: 2 additions & 1 deletion benchmarks/benchmarks/experimental/ugrid/regions_combine.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
run-time that scale with data size.

"""

import os

import dask.array as da
Expand Down Expand Up @@ -92,7 +93,7 @@ def setup_cache(self):
)

def setup(self, n_cubesphere, imaginary_data=True, create_result_cube=True):
"""Combine-tests "standard" setup operation.
"""Combine tests "standard" setup operation.

Load the source cubes (full-mesh + region) from disk.
These are specific to the cubesize parameter.
Expand Down
1 change: 1 addition & 0 deletions benchmarks/benchmarks/generate_data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
benchmark sequence runs over two different Python versions.

"""

from contextlib import contextmanager
from inspect import getsource
from os import environ
Expand Down
1 change: 1 addition & 0 deletions benchmarks/benchmarks/generate_data/ugrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# This file is part of Iris and is released under the BSD license.
# See LICENSE in the root of the repository for full licensing details.
"""Scripts for generating supporting data for UGRID-related benchmarking."""

from iris import load_cube as iris_loadcube
from iris.experimental.ugrid import PARSE_UGRID_ON_LOAD

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/benchmarks/import_iris.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This file is part of Iris and is released under the BSD license.
# See LICENSE in the root of the repository for full licensing details.

"""import iris benchmarking."""
"""Import iris benchmarking."""

from importlib import import_module, reload

Expand Down
1 change: 1 addition & 0 deletions benchmarks/benchmarks/iterate.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# This file is part of Iris and is released under the BSD license.
# See LICENSE in the root of the repository for full licensing details.
"""Iterate benchmark tests."""

import numpy as np

from iris import coords, cube, iterate
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/benchmarks/load/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class ManyVars:

@staticmethod
def _create_file(save_path: str) -> None:
"""Is run externally - everything must be self-contained."""
"""Run externally - everything must be self-contained."""
import numpy as np

from iris import save
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/benchmarks/metadata_manager_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# This file is part of Iris and is released under the BSD license.
# See LICENSE in the root of the repository for full licensing details.
"""metadata_manager_factory benchmark tests."""
"""Metadata manager factory benchmark tests."""

from iris.common import (
AncillaryVariableMetadata,
Expand Down
1 change: 1 addition & 0 deletions benchmarks/benchmarks/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# This file is part of Iris and is released under the BSD license.
# See LICENSE in the root of the repository for full licensing details.
"""Plot benchmark tests."""

import matplotlib as mpl
import numpy as np

Expand Down
1 change: 1 addition & 0 deletions benchmarks/benchmarks/save.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
run-time that scale with data size.

"""

from iris import save
from iris.experimental.ugrid import save_mesh

Expand Down
1 change: 1 addition & 0 deletions benchmarks/benchmarks/sperf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
SPerf = assessing performance against a series of increasingly large LFRic
datasets.
"""

from iris import load_cube

# TODO: remove uses of PARSE_UGRID_ON_LOAD once UGRID parsing is core behaviour.
Expand Down
3 changes: 2 additions & 1 deletion benchmarks/benchmarks/sperf/combine_regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# This file is part of Iris and is released under the BSD license.
# See LICENSE in the root of the repository for full licensing details.
"""Region combine benchmarks for the SPerf scheme of the UK Met Office's NG-VAT project."""

import os.path

from dask import array as da
Expand Down Expand Up @@ -83,7 +84,7 @@ def setup_cache(self):
)

def setup(self, n_cubesphere, imaginary_data=True, create_result_cube=True):
"""Combine-tests "standard" setup operation.
"""Combine tests "standard" setup operation.

Load the source cubes (full-mesh + region) from disk.
These are specific to the cubesize parameter.
Expand Down
1 change: 1 addition & 0 deletions benchmarks/benchmarks/sperf/equality.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# This file is part of Iris and is released under the BSD license.
# See LICENSE in the root of the repository for full licensing details.
"""Equality benchmarks for the SPerf scheme of the UK Met Office's NG-VAT project."""

from .. import on_demand_benchmark
from . import FileMixin

Expand Down
1 change: 1 addition & 0 deletions benchmarks/benchmarks/sperf/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# This file is part of Iris and is released under the BSD license.
# See LICENSE in the root of the repository for full licensing details.
"""File loading benchmarks for the SPerf scheme of the UK Met Office's NG-VAT project."""

from .. import on_demand_benchmark
from . import FileMixin

Expand Down
1 change: 1 addition & 0 deletions benchmarks/benchmarks/sperf/save.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# This file is part of Iris and is released under the BSD license.
# See LICENSE in the root of the repository for full licensing details.
"""File saving benchmarks for the SPerf scheme of the UK Met Office's NG-VAT project."""

import os.path

from iris import save
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/bm_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def _check_requirements(package: str) -> None:


def _prep_data_gen_env() -> None:
"""Create/access a separate, unchanging environment for generating test data."""
"""Create or access a separate, unchanging environment for generating test data."""
python_version = "3.11"
data_gen_var = "DATA_GEN_PYTHON"
if data_gen_var in environ:
Expand Down Expand Up @@ -171,7 +171,7 @@ def _gh_create_reports(commit_sha: str, results_full: str, results_shifts: str)
performance_report = dedent(
(
"""
### Performance Benchmark Report: {commit_sha}
# :stopwatch: Performance Benchmark Report: {commit_sha}

<details>
<summary>Performance shifts</summary>
Expand Down
Loading
Loading