Skip to content

Commit

Permalink
Merge branch 'main' of github.com:scitools/iris into parallel-concate…
Browse files Browse the repository at this point in the history
…nate
  • Loading branch information
bouweandela committed May 15, 2024
2 parents 24615a0 + 25b685c commit 5c68a8e
Show file tree
Hide file tree
Showing 28 changed files with 1,013 additions and 505 deletions.
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.04.2
uses: scitools/workflows/.github/workflows/ci-manifest.yml@2024.05.0
6 changes: 4 additions & 2 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ jobs:
run: |
nox --session ${{ matrix.session }} -- --verbose ${{ matrix.coverage }}
- name: Upload coverage report
uses: codecov/codecov-action@v4
- name: "upload coverage report"
if: ${{ matrix.coverage }}
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
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.04.2
uses: scitools/workflows/.github/workflows/refresh-lockfiles.yml@2024.05.0
secrets: inherit
2 changes: 1 addition & 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.4.1"
rev: "v0.4.4"
hooks:
- id: ruff
types: [file, python]
Expand Down
21 changes: 21 additions & 0 deletions benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,23 @@ interest. Is set during the benchmark runner `cperf` and `sperf` sub-commands.

[See the ASV docs](https://asv.readthedocs.io/) for full detail.

### What benchmarks to write

It is not possible to maintain a full suite of 'unit style' benchmarks:

* Benchmarks take longer to run than tests.
* Small benchmarks are more vulnerable to noise - they report a lot of false
positive regressions.

We therefore recommend writing benchmarks representing scripts or single
operations that are likely to be run at the user level.

The drawback of this approach: a reported regression is less likely to reveal
the root cause (e.g. if a commit caused a regression in coordinate-creation
time, but the only benchmark covering this was for file-loading). Be prepared
for manual investigations; and consider committing any useful benchmarks as
[on-demand benchmarks](#on-demand-benchmarks) for future developers to use.

### Data generation
**Important:** be sure not to use the benchmarking environment to generate any
test objects/files, as this environment changes with each commit being
Expand All @@ -86,6 +103,10 @@ estimate run-time, and these will still be subject to the original problem.

### Scaling / non-Scaling Performance Differences

**(We no longer advocate the below for benchmarks run during CI, given the
limited available runtime and risk of false-positives. It remains useful for
manual investigations).**

When comparing performance between commits/file-type/whatever it can be helpful
to know if the differences exist in scaling or non-scaling parts of the Iris
functionality in question. This can be done using a size parameter, setting
Expand Down
5 changes: 5 additions & 0 deletions benchmarks/asv_delegated_conda.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@ def copy_asv_files(src_parent: Path, dst_parent: Path) -> None:
# Record new environment information in properties.
self._update_info()

def _run_conda(self, args, env=None):
# TODO: remove after airspeed-velocity/asv#1397 is merged and released.
args = ["--yes" if arg == "--force" else arg for arg in args]
return super()._run_conda(args, env)

def checkout_project(self, repo: Repo, commit_hash: str) -> None:
"""Check out the working tree of the project at given commit hash."""
super().checkout_project(repo, commit_hash)
Expand Down
2 changes: 0 additions & 2 deletions benchmarks/benchmarks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
from os import environ
import resource

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


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

0 comments on commit 5c68a8e

Please sign in to comment.