Skip to content

Commit

Permalink
Merge branch 'main' into theme_play
Browse files Browse the repository at this point in the history
* main: (44 commits)
  [pre-commit.ci] pre-commit autoupdate (SciTools#4395)
  min pin for numpy (nep29) (SciTools#4386)
  Updated environment lockfiles (SciTools#4393)
  Extend stock.mesh api (SciTools#4389)
  Updated environment lockfiles (SciTools#4388)
  Integrate ASV with Nox (SciTools#4378)
  NetCDF save - stream ALL lazy arrays. (SciTools#4375)
  adopt flake8 maccabe complexity metric (SciTools#4380)
  Accept inverse_flattening = 0 for spherical ellipsoid (closes SciTools#4146) (SciTools#4368)
  Updated environment lockfiles (SciTools#4379)
  Prevent warning in `test_Saver` (SciTools#4376)
  drop pyugrid in site.cfg (SciTools#4373)
  `flake8` dependency (SciTools#4371)
  update latest whosnew (SciTools#4372)
  Allow `check_graphic` to be more flexible (SciTools#4370)
  [pre-commit.ci] pre-commit autoupdate (SciTools#4365)
  Updated environment lockfiles (SciTools#4364)
  Update latest.rst (SciTools#4362)
  More clarity on setting `iris-test-data` location. (SciTools#4359)
  update whatsnew (SciTools#4361)
  ...
  • Loading branch information
tkknight committed Nov 3, 2021
2 parents 9da0b57 + 802abdb commit af1112d
Show file tree
Hide file tree
Showing 100 changed files with 8,993 additions and 5,082 deletions.
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ linux_task_template: &LINUX_TASK_TEMPLATE
- source ${HOME}/miniconda/etc/profile.d/conda.sh >/dev/null 2>&1
- conda activate cartopy-cache >/dev/null 2>&1
- cd $(mktemp -d)
- wget --quiet https://raw.githubusercontent.com/SciTools/cartopy/master/tools/cartopy_feature_download.py
- wget --quiet https://raw.githubusercontent.com/SciTools/cartopy/v0.20.0/tools/cartopy_feature_download.py
- python cartopy_feature_download.py physical --output ${HOME}/.local/share/cartopy --no-warn
- conda deactivate >/dev/null 2>&1
nox_cache:
Expand Down
39 changes: 22 additions & 17 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,34 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Checkout the branches
- name: Fetch the PR base branch too
run: |
git fetch --depth=1 origin ${{ github.event.pull_request.base.ref }}
git branch _base FETCH_HEAD
git fetch --depth=1 origin ${{ github.ref }}
git branch _head FETCH_HEAD
echo PR_BASE_SHA=$(git rev-parse _base) >> $GITHUB_ENV
- name: Setup asv
- name: Install Nox
run: |
pip install asv
cd benchmarks
asv machine --yes
pip install nox
- name: Run benchmarks on source and target
run: |
cd benchmarks
asv continuous --factor 1.2 _base _head
- name: Write a compare file to the output folder
if: ${{ always() }}
- name: Cache .nox and .asv/env directories
id: cache-env-dir
uses: actions/cache@v2
with:
path: |
.nox
benchmarks/.asv/env
# Make sure GHA never gets an exact cache match by using the unique
# github.sha. This means it will always store this run as a new
# cache (Nox may have made relevant changes during run). Cache
# restoration still succeeds via the partial restore-key match.
key: ${{ runner.os }}-${{ github.sha }}
restore-keys: ${{ runner.os }}

- name: Run CI benchmarks
run: |
cd benchmarks
asv compare -s _base _head > .asv/compare.txt
mkdir --parents benchmarks/.asv
nox --session="benchmarks(ci compare)" | tee benchmarks/.asv/ci_compare.txt
- name: Archive asv results
if: ${{ always() }}
Expand All @@ -45,4 +50,4 @@ jobs:
name: asv-report
path: |
benchmarks/.asv/results
benchmarks/.asv/compare.txt
benchmarks/.asv/ci_compare.txt
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,7 @@ docs/iris_image_test_output/
\.\#*
*.swp
.ipynb_checkpoints

# Files generated during test runs.
lib/iris/tests/results/**/*.dot
lib/iris/tests/results/PP/extra_char_data.w_data_loaded.pp.txt
10 changes: 8 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ repos:
- id: no-commit-to-branch

- repo: https://github.com/psf/black
rev: 21.8b0
rev: 21.10b0
hooks:
- id: black
pass_filenames: false
args: [--config=./pyproject.toml, .]

- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
rev: 4.0.1
hooks:
- id: flake8
types: [file, python]
Expand All @@ -54,3 +54,9 @@ repos:
- id: blacken-docs
types: [file, rst]
additional_dependencies: [black==21.6b0]

- repo: https://github.com/aio-libs/sort-all
rev: v1.1.0
hooks:
- id: sort-all
types: [file, python]
13 changes: 8 additions & 5 deletions benchmarks/asv.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@
"project": "scitools-iris",
"project_url": "https://github.com/SciTools/iris",
"repo": "..",
"environment_type": "conda-lock",
"environment_type": "nox-conda",
"show_commit_url": "http://github.com/scitools/iris/commit/",

"benchmark_dir": "./benchmarks",
"env_dir": ".asv/env",
"results_dir": ".asv/results",
"html_dir": ".asv/html",
"plugins": [".conda_lock_plugin"],
// this is not an asv standard config entry, just for our plugin
// path to lockfile, relative to project base
"conda_lockfile": "requirements/ci/nox.lock/py38-linux-64.lock"
"plugins": [".nox_asv_plugin"],
// The commit to checkout to first run Nox to set up the environment.
"nox_setup_commit": "HEAD",
// The path of the noxfile's location relative to the project root.
"noxfile_rel_path": "noxfile.py",
// The ``--session`` arg to be used with ``--install-only`` to prep an environment.
"nox_session_name": "tests"
}
68 changes: 0 additions & 68 deletions benchmarks/conda_lock_plugin.py

This file was deleted.

Loading

0 comments on commit af1112d

Please sign in to comment.