Skip to content

Commit

Permalink
Merge branch 'main' into theme_play
Browse files Browse the repository at this point in the history
* main: (64 commits)
  [pre-commit.ci] pre-commit autoupdate (SciTools#4587)
  fix test (SciTools#4585)
  Loading Benchmarks (SciTools#4477)
  Fix refresh lockfile worrkflow pull request title (SciTools#4579)
  gha: lockfiles labels and auto-pr details (SciTools#4578)
  Bump actions/script from 4 to 5.1.0 (SciTools#4576)
  Bump actions/stale from 4.0.0 to 4.1.0 (SciTools#4575)
  Bump peter-evans/create-pull-request from 3.8.2 to 3.12.1 (SciTools#4577)
  adopt dependabot GHA (SciTools#4568)
  New tool-agnostic ASV environment management (SciTools#4571)
  Updated environment lockfiles (SciTools#4567)
  Update version to 3.3.dev0 (SciTools#4565)
  Reset whats new (SciTools#4563)
  docs: move whatsnew (SciTools#4540)
  Deprecate regrids (SciTools#4548)
  Update latest.rst (SciTools#4556)
  Updated environment lockfiles (SciTools#4555)
  Added whatsnew for SciTools#4551. (SciTools#4553)
  Update SciTools#4505 doctests for SciTools#4528. (SciTools#4554)
  minor optimisations (SciTools#4549)
  ...
  • Loading branch information
tkknight committed Mar 2, 2022
2 parents 5ce875c + cf5413c commit 98c5d9b
Show file tree
Hide file tree
Showing 176 changed files with 9,592 additions and 6,046 deletions.
6 changes: 0 additions & 6 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ linux_task_template: &LINUX_TASK_TEMPLATE
- echo "$(date +%Y).$(expr $(date +%U) / ${CACHE_PERIOD}):${CONDA_CACHE_BUILD}"
- uname -r
populate_script:
- export CONDA_OVERRIDE_LINUX="$(uname -r | cut -d'+' -f1)"
- bash miniconda.sh -b -p ${HOME}/miniconda
- conda config --set always_yes yes --set changeps1 no
- conda config --set show_channel_urls True
Expand Down Expand Up @@ -141,8 +140,6 @@ task:
only_if: ${SKIP_TEST_TASK} == ""
<< : *CREDITS_TEMPLATE
matrix:
env:
PY_VER: 3.7
env:
PY_VER: 3.8
name: "${CIRRUS_OS}: py${PY_VER} tests"
Expand All @@ -153,7 +150,6 @@ task:
<< : *IRIS_TEST_DATA_TEMPLATE
<< : *LINUX_TASK_TEMPLATE
tests_script:
- export CONDA_OVERRIDE_LINUX="$(uname -r | cut -d'+' -f1)"
- echo "[Resources]" > ${SITE_CFG}
- echo "test_data_dir = ${IRIS_TEST_DATA_DIR}/test_data" >> ${SITE_CFG}
- echo "doc_dir = ${CIRRUS_WORKING_DIR}/docs" >> ${SITE_CFG}
Expand All @@ -174,7 +170,6 @@ task:
<< : *IRIS_TEST_DATA_TEMPLATE
<< : *LINUX_TASK_TEMPLATE
tests_script:
- export CONDA_OVERRIDE_LINUX="$(uname -r | cut -d'+' -f1)"
- echo "[Resources]" > ${SITE_CFG}
- echo "test_data_dir = ${IRIS_TEST_DATA_DIR}/test_data" >> ${SITE_CFG}
- echo "doc_dir = ${CIRRUS_WORKING_DIR}/docs" >> ${SITE_CFG}
Expand All @@ -197,7 +192,6 @@ task:
name: "${CIRRUS_OS}: py${PY_VER} link check"
<< : *LINUX_TASK_TEMPLATE
tests_script:
- export CONDA_OVERRIDE_LINUX="$(uname -r | cut -d'+' -f1)"
- mkdir -p ${MPL_RC_DIR}
- echo "backend : agg" > ${MPL_RC_FILE}
- echo "image.cmap : viridis" >> ${MPL_RC_FILE}
Expand Down
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Reference:
# - https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot
# - https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday
interval: "daily"
labels:
- "New: Pull Request"
- "Bot"
14 changes: 6 additions & 8 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ jobs:
IRIS_TEST_DATA_PATH: benchmarks/iris-test-data
IRIS_TEST_DATA_VERSION: "2.5"
# Lets us manually bump the cache to rebuild
ENV_CACHE_BUILD: "0"
TEST_DATA_CACHE_BUILD: "2"
PY_VER: 3.8

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand All @@ -32,19 +34,15 @@ jobs:
run: |
pip install nox
- name: Cache .nox and .asv/env directories
- name: Cache environment 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 }}
$CONDA/pkgs
key: ${{ runner.os }}-${{ hashFiles('requirements/') }}-${{ env.ENV_CACHE_BUILD }}

- name: Cache test data directory
id: cache-test-data
Expand All @@ -62,7 +60,7 @@ jobs:
unzip -q iris-test-data.zip
mkdir --parents ${GITHUB_WORKSPACE}/${IRIS_TEST_DATA_LOC_PATH}
mv iris-test-data-${IRIS_TEST_DATA_VERSION} ${GITHUB_WORKSPACE}/${IRIS_TEST_DATA_PATH}
- name: Set test data var
run: |
echo "OVERRIDE_TEST_DATA_REPOSITORY=${GITHUB_WORKSPACE}/${IRIS_TEST_DATA_PATH}/test_data" >> $GITHUB_ENV
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/refresh-lockfiles.yml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
# the lockfile bot has made the head commit, abort the workflow.
# This job can be manually overridden by running directly from the github actions panel
# (known as a "workflow_dispatch") and setting the `clobber` input to "yes".
- uses: actions/script@v4
- uses: actions/script@v5.1.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:

strategy:
matrix:
python: ['37', '38']
python: ['38']

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -108,13 +108,25 @@ jobs:
rm -r artifacts
- name: Create Pull Request
uses: peter-evans/create-pull-request@052fc72b4198ba9fbc81b818c6e1859f747d49a8
id: cpr
uses: peter-evans/create-pull-request@f22a7da129c901513876a2380e2dae9f8e145330
with:
commit-message: Updated environment lockfiles
committer: "Lockfile bot <[email protected]>"
author: "Lockfile bot <[email protected]>"
delete-branch: true
branch: auto-update-lockfiles
title: Update CI environment lockfiles
title: "[iris.ci] environment lockfiles auto-update"
body: |
Lockfiles updated to the latest resolvable environment.
labels: |
New: Pull Request
Bot
- name: Check Pull Request
if: steps.cpr.outputs.pull-request-number != ''
run: |
echo "pull-request #${{ steps.cpr.outputs.pull-request-number }}"
echo "pull-request URL ${{ steps.cpr.outputs.pull-request-url }}"
echo "pull-request operation [${{ steps.cpr.outputs.pull-request-operation }}]"
echo "pull-request head SHA ${{ steps.cpr.outputs.pull-request-head-sha }}"
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
if: "github.repository == 'SciTools/iris'"
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v4.0.0
- uses: actions/stale@v4.1.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ minimum_pre_commit_version: 1.21.0

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.1.0
hooks:
# Prevent giant files from being committed.
- id: check-added-large-files
Expand All @@ -29,7 +29,7 @@ repos:
- id: no-commit-to-branch

- repo: https://github.com/psf/black
rev: 21.12b0
rev: 22.1.0
hooks:
- id: black
pass_filenames: false
Expand All @@ -50,14 +50,14 @@ repos:
args: [--filter-files]

- repo: https://github.com/asottile/blacken-docs
rev: v1.12.0
rev: v1.12.1
hooks:
- id: blacken-docs
types: [file, rst]
additional_dependencies: [black==21.6b0]

- repo: https://github.com/aio-libs/sort-all
rev: v1.1.0
rev: v1.2.0
hooks:
- id: sort-all
types: [file, python]
22 changes: 11 additions & 11 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
version: 2

build:
image: latest
os: ubuntu-20.04
tools:
python: mambaforge-4.10

conda:
environment: requirements/ci/readthedocs.yml
environment: requirements/ci/readthedocs.yml

sphinx:
configuration: docs/src/conf.py
fail_on_warning: false
configuration: docs/src/conf.py
fail_on_warning: false

python:
install:
- method: setuptools
path: .

formats:
- htmlzip
- pdf
install:
- method: pip
path: .
extra_requirements:
- docs
23 changes: 15 additions & 8 deletions benchmarks/asv.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,25 @@
"project": "scitools-iris",
"project_url": "https://github.com/SciTools/iris",
"repo": "..",
"environment_type": "nox-conda",
"environment_type": "conda-delegated",
"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": [".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"
"plugins": [".asv_delegated_conda"],

// The command(s) that create/update an environment correctly for the
// checked-out commit.
// Interpreted the same as build_command, with following exceptions:
// * No build-time environment variables.
// * Is run in the same environment as the ASV install itself.
"delegated_env_commands": [
"sed -i 's/_PY_VERSIONS_ALL/_PY_VERSION_LATEST/g' noxfile.py",
"nox --envdir={conf_dir}/.asv/env/nox01 --session=tests --install-only --no-error-on-external-run --verbose"
],
// The parent directory of the above environment.
// The most recently modified environment in the directory will be used.
"delegated_env_parent": "{conf_dir}/.asv/env/nox01"
}
Loading

0 comments on commit 98c5d9b

Please sign in to comment.