Skip to content

Commit d9f4c5b

Browse files
committed
Merge remote-tracking branch 'upstream/main' into dark_theme
* upstream/main: (61 commits) Updated environment lockfiles (SciTools#5270) Drop python3.8 support (SciTools#5269) build wheel from sdist, not src (SciTools#5266) Lazy netcdf saves (SciTools#5191) move setup.cfg to pyproject.toml (SciTools#5262) Support Python 3.11 (SciTools#5226) Remove Resolve test workaround (SciTools#5267) add missing whatsnew entry (SciTools#5265) make help (SciTools#5258) automate pypi manifest checking (SciTools#5259) drop sphinxcontrib-napoleon (SciTools#5263) add missing test result data (SciTools#5260) fix indentation and remove ref to ssstack (SciTools#5256) review actions update .git-blame-ignore-revs adopt codespell Adopt sphinx design (SciTools#5127) Bump scitools/workflows from 2023.04.2 to 2023.04.3 (SciTools#5253) refresh manual pypi publish instructions (SciTools#5252) Updated environment lockfiles (SciTools#5250) ...
2 parents c1e6e47 + 6cecf04 commit d9f4c5b

File tree

753 files changed

+32932
-26606
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

753 files changed

+32932
-26606
lines changed

.flake8

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
[flake8]
2+
# References:
3+
# https://flake8.readthedocs.io/en/latest/user/configuration.html
4+
# https://flake8.readthedocs.io/en/latest/user/error-codes.html
5+
# https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes
6+
7+
max-line-length = 80
8+
max-complexity = 50
9+
select = C,E,F,W,B,B950
10+
ignore =
11+
# E203: whitespace before ':'
12+
E203,
13+
# E226: missing whitespace around arithmetic operator
14+
E226,
15+
# E231: missing whitespace after ',', ';', or ':'
16+
E231,
17+
# E402: module level imports on one line
18+
E402,
19+
# E501: line too long
20+
E501,
21+
# E731: do not assign a lambda expression, use a def
22+
E731,
23+
# W503: line break before binary operator
24+
W503,
25+
# W504: line break after binary operator
26+
W504,
27+
exclude =
28+
#
29+
# ignore the following directories
30+
#
31+
.eggs,
32+
build,
33+
docs/src/sphinxext/*,
34+
tools/*,
35+
benchmarks/*,
36+
#
37+
# ignore auto-generated files
38+
#
39+
_ff_cross_refrences.py,
40+
std_names.py,
41+
um_cf_map.py,
42+
#
43+
# ignore third-party files
44+
#
45+
gitwash_dumper.py,
46+
#
47+
# convenience imports
48+
#
49+
lib/iris/common/__init__.py

.git-blame-ignore-revs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Format: numpy array format (#5235)
2+
c18dcd8dafef0cc7bbbf80dfce66f76a46ce59c5
3+
4+
# style: flake8 (#3755)
5+
7c86bc0168684345dc475457b1a77dadc77ce9bb
6+
7+
# style: black (#3518)
8+
ffcfad475e0593e1e40895453cf1df154e5f6f2c
9+
10+
# style: isort (#4174)
11+
15bbcc5ac3d539cb6e820148b66e7cf55d91c5d2
12+
13+
# style: blacken-docs (#4205)
14+
1572e180243e492d8ff76fa8cdefb82ef6f90415
15+
16+
# style: sort-all (#4353)
17+
64705dbc40881233aae45f051d96049150369e53
18+
19+
# style: codespell (#5186)
20+
417aa6bbd9b10d25cad7def54d47ef4d718bc38d

.github/workflows/benchmark.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,20 @@ jobs:
2121
env:
2222
IRIS_TEST_DATA_LOC_PATH: benchmarks
2323
IRIS_TEST_DATA_PATH: benchmarks/iris-test-data
24-
IRIS_TEST_DATA_VERSION: "2.18"
24+
IRIS_TEST_DATA_VERSION: "2.19"
2525
# Lets us manually bump the cache to rebuild
2626
ENV_CACHE_BUILD: "0"
2727
TEST_DATA_CACHE_BUILD: "2"
28-
PY_VER: 3.8
2928

3029
steps:
3130
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
3231
- uses: actions/checkout@v3
3332
with:
3433
fetch-depth: 0
3534

36-
- name: Install Nox
35+
- name: Install ASV & Nox
3736
run: |
38-
pip install nox
37+
pip install asv nox
3938
4039
- name: Cache environment directories
4140
id: cache-env-dir
@@ -78,7 +77,7 @@ jobs:
7877
7978
if [ "$first_commit" != "" ]
8079
then
81-
nox --session="benchmarks(overnight)" -- $first_commit
80+
python benchmarks/bm_runner.py overnight $first_commit
8281
fi
8382
8483
- name: Create issues for performance shifts

.github/workflows/ci-manifest.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Reference
2+
# - https://github.com/actions/checkout
3+
4+
name: ci-manifest
5+
6+
on:
7+
pull_request:
8+
branches:
9+
- "*"
10+
11+
push:
12+
branches-ignore:
13+
- "auto-update-lockfiles"
14+
- "pre-commit-ci-update-config"
15+
- "dependabot/*"
16+
17+
workflow_dispatch:
18+
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.ref }}
21+
cancel-in-progress: true
22+
23+
jobs:
24+
manifest:
25+
name: "check-manifest"
26+
uses: scitools/workflows/.github/workflows/ci-manifest.yml@2023.04.3

.github/workflows/ci-tests.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,22 @@ jobs:
3535
fail-fast: false
3636
matrix:
3737
os: ["ubuntu-latest"]
38-
python-version: ["3.10"]
38+
python-version: ["3.11"]
3939
session: ["doctest", "gallery", "linkcheck"]
4040
include:
4141
- os: "ubuntu-latest"
42-
python-version: "3.10"
42+
python-version: "3.11"
4343
session: "tests"
4444
coverage: "--coverage"
4545
- os: "ubuntu-latest"
46-
python-version: "3.9"
46+
python-version: "3.10"
4747
session: "tests"
4848
- os: "ubuntu-latest"
49-
python-version: "3.8"
49+
python-version: "3.9"
5050
session: "tests"
5151

5252
env:
53-
IRIS_TEST_DATA_VERSION: "2.18"
53+
IRIS_TEST_DATA_VERSION: "2.19"
5454
ENV_NAME: "ci-tests"
5555

5656
steps:
@@ -63,7 +63,7 @@ jobs:
6363
CACHE_WEEKS: 2
6464
run: |
6565
echo "CACHE_PERIOD=$(date +%Y).$(expr $(date +%U) / ${CACHE_WEEKS})" >> ${GITHUB_ENV}
66-
echo "LOCK_FILE=requirements/ci/nox.lock/py$(echo ${{ matrix.python-version }} | tr -d '.')-linux-64.lock" >> ${GITHUB_ENV}
66+
echo "LOCK_FILE=requirements/locks/py$(echo ${{ matrix.python-version }} | tr -d '.')-linux-64.lock" >> ${GITHUB_ENV}
6767
6868
- name: "data cache"
6969
uses: ./.github/workflows/composite/iris-data-cache
@@ -111,7 +111,7 @@ jobs:
111111
- name: "nox cache"
112112
uses: ./.github/workflows/composite/nox-cache
113113
with:
114-
cache_build: 0
114+
cache_build: 2
115115
env_name: ${{ env.ENV_NAME }}
116116
lock_file: ${{ env.LOCK_FILE }}
117117

.github/workflows/ci-wheels.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ jobs:
3535
- name: "building"
3636
shell: bash
3737
run: |
38-
# require build with explicit --sdist and --wheel in order to
39-
# get correct version associated with sdist and bdist artifacts
40-
pipx run build --sdist --wheel
38+
pipx run build
4139
4240
- uses: actions/upload-artifact@v3
4341
with:
@@ -54,7 +52,7 @@ jobs:
5452
strategy:
5553
fail-fast: false
5654
matrix:
57-
python-version: ["3.8", "3.9", "3.10"]
55+
python-version: ["3.9", "3.10", "3.11"]
5856
session: ["wheel"]
5957
env:
6058
ENV_NAME: "ci-wheels"
@@ -74,7 +72,7 @@ jobs:
7472
CACHE_WEEKS: 2
7573
run: |
7674
echo "CACHE_PERIOD=$(date +%Y).$(expr $(date +%U) / ${CACHE_WEEKS})" >> ${GITHUB_ENV}
77-
echo "LOCK_FILE=requirements/ci/nox.lock/py$(echo ${{ matrix.python-version }} | tr -d '.')-linux-64.lock" >> ${GITHUB_ENV}
75+
echo "LOCK_FILE=requirements/locks/py$(echo ${{ matrix.python-version }} | tr -d '.')-linux-64.lock" >> ${GITHUB_ENV}
7876
7977
- name: "conda package cache"
8078
uses: ./.github/workflows/composite/conda-pkg-cache
@@ -103,7 +101,7 @@ jobs:
103101
- name: "nox cache"
104102
uses: ./.github/workflows/composite/nox-cache
105103
with:
106-
cache_build: 0
104+
cache_build: 1
107105
env_name: ${{ env.ENV_NAME }}
108106
lock_file: ${{ env.LOCK_FILE }}
109107

@@ -132,7 +130,8 @@ jobs:
132130
name: "publish to test.pypi"
133131
runs-on: ubuntu-latest
134132
# upload to Test PyPI for every commit on main branch
135-
if: github.event_name == 'push' && github.event.ref == 'refs/heads/main'
133+
# and check for the SciTools repo
134+
if: github.event_name == 'push' && github.event.ref == 'refs/heads/main' && github.repository_owner == 'SciTools'
136135
steps:
137136
- uses: actions/download-artifact@v3
138137
with:
@@ -152,7 +151,7 @@ jobs:
152151
name: "publish to pypi"
153152
runs-on: ubuntu-latest
154153
# upload to PyPI for every tag starting with 'v'
155-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
154+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') && github.repository_owner == 'SciTools'
156155
steps:
157156
- uses: actions/download-artifact@v3
158157
with:

.github/workflows/refresh-lockfiles.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ on:
1414

1515
jobs:
1616
refresh_lockfiles:
17-
uses: scitools/workflows/.github/workflows/refresh-lockfiles.yml@main
17+
uses: scitools/workflows/.github/workflows/refresh-lockfiles.yml@2023.04.3
1818
secrets: inherit

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
if: "github.repository == 'SciTools/iris'"
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/stale@v7
17+
- uses: actions/stale@v8
1818
with:
1919
repo-token: ${{ secrets.GITHUB_TOKEN }}
2020

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,3 @@ docs/iris_image_test_output/
7777

7878
# Files generated during test runs.
7979
lib/iris/tests/results/**/*.dot
80-
lib/iris/tests/results/PP/extra_char_data.w_data_loaded.pp.txt

.pre-commit-config.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,15 @@ repos:
2828
# Don't commit to main branch.
2929
- id: no-commit-to-branch
3030

31+
- repo: https://github.com/codespell-project/codespell
32+
rev: "v2.2.2"
33+
hooks:
34+
- id: codespell
35+
types_or: [asciidoc, python, markdown, rst]
36+
additional_dependencies: [tomli]
37+
3138
- repo: https://github.com/psf/black
32-
rev: 23.1.0
39+
rev: 23.3.0
3340
hooks:
3441
- id: black
3542
pass_filenames: false
@@ -40,7 +47,6 @@ repos:
4047
hooks:
4148
- id: flake8
4249
types: [file, python]
43-
args: [--config=./setup.cfg]
4450

4551
- repo: https://github.com/pycqa/isort
4652
rev: 5.12.0

0 commit comments

Comments
 (0)