Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into all_benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
trexfeathers committed Feb 1, 2022
2 parents 7561195 + d503ce6 commit 81c4bcf
Show file tree
Hide file tree
Showing 169 changed files with 9,211 additions and 5,909 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
2 changes: 1 addition & 1 deletion .github/workflows/refresh-lockfiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:

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

steps:
- uses: actions/checkout@v2
Expand Down
6 changes: 3 additions & 3 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.11b1
rev: 22.1.0
hooks:
- id: black
pass_filenames: false
Expand All @@ -50,7 +50,7 @@ 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]
Expand Down
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
2 changes: 1 addition & 1 deletion benchmarks/benchmarks/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def setup(self):
# Should generate 10 distinct contours, regardless of dim size.
dim_size = int(ARTIFICIAL_DIM_SIZE / 5)
repeat_number = int(dim_size / 10)
repeat_range = range(int((dim_size ** 2) / repeat_number))
repeat_range = range(int((dim_size**2) / repeat_number))
data = np.repeat(repeat_range, repeat_number)
data = data.reshape((dim_size,) * 2)

Expand Down
2 changes: 1 addition & 1 deletion docs/gallery_code/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ you may start the jupyter notebook via::

If you wish to contribute to the gallery see the
:ref:`contributing.documentation.gallery` section of the
:ref:`contributing.documentation`.
:ref:`contributing.documentation_full`.
4 changes: 2 additions & 2 deletions docs/gallery_code/meteorology/plot_wind_barbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def main():

# To illustrate the full range of barbs, scale the wind speed up to pretend
# that a storm is passing over
magnitude = (uwind ** 2 + vwind ** 2) ** 0.5
magnitude = (uwind**2 + vwind**2) ** 0.5
magnitude.convert_units("knot")
max_speed = magnitude.collapsed(
("latitude", "longitude"), iris.analysis.MAX
Expand All @@ -41,7 +41,7 @@ def main():
vwind = vwind / max_speed * max_desired

# Create a cube containing the wind speed
windspeed = (uwind ** 2 + vwind ** 2) ** 0.5
windspeed = (uwind**2 + vwind**2) ** 0.5
windspeed.rename("windspeed")
windspeed.convert_units("knot")

Expand Down
2 changes: 1 addition & 1 deletion docs/gallery_code/meteorology/plot_wind_speed.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def main():
vwind = iris.load_cube(infile, "y_wind")

# Create a cube containing the wind speed.
windspeed = (uwind ** 2 + vwind ** 2) ** 0.5
windspeed = (uwind**2 + vwind**2) ** 0.5
windspeed.rename("windspeed")

# Plot the wind speed as a contour plot.
Expand Down
15 changes: 15 additions & 0 deletions docs/src/_templates/imagehash.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{% extends "!layout.html" %}

{% block body %}

<h1>Test: {{ test }}</h1>


{% for hash, file in hashfiles %}
<div>
<h3>{{hash}}</h3>
<img src="{{file}}" />
</div>
{% endfor %}

{% endblock %}
1 change: 1 addition & 0 deletions docs/src/common_links.inc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
.. _test-iris-imagehash: https://github.com/SciTools/test-iris-imagehash
.. _using git: https://docs.github.com/en/github/using-git
.. _requirements/ci/: https://github.com/SciTools/iris/tree/main/requirements/ci
.. _CF-UGRID: https://ugrid-conventions.github.io/ugrid-conventions/


.. comment
Expand Down
10 changes: 8 additions & 2 deletions docs/src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ def _dotv(version):
"sphinx_gallery.gen_gallery",
"matplotlib.sphinxext.mathmpl",
"matplotlib.sphinxext.plot_directive",
"image_test_output",
]

if skip_api == "1":
Expand Down Expand Up @@ -199,7 +200,9 @@ def _dotv(version):

# -- copybutton extension -----------------------------------------------------
# See https://sphinx-copybutton.readthedocs.io/en/latest/
copybutton_prompt_text = ">>> "
copybutton_prompt_text = r">>> |\.\.\. "
copybutton_prompt_is_regexp = True
copybutton_line_continuation_character = "\\"

# sphinx.ext.todo configuration -----------------------------------------------
# See https://www.sphinx-doc.org/en/master/usage/extensions/todo.html
Expand All @@ -208,6 +211,7 @@ def _dotv(version):
# api generation configuration
autodoc_member_order = "groupwise"
autodoc_default_flags = ["show-inheritance"]
autodoc_typehints = "none"
autosummary_generate = True
autosummary_imported_members = True
autopackage_name = ["iris"]
Expand Down Expand Up @@ -327,8 +331,10 @@ def _dotv(version):
"gallery_dirs": ["generated/gallery"],
# filename pattern for the files in the gallery
"filename_pattern": "/plot_",
# filename patternt to ignore in the gallery
# filename pattern to ignore in the gallery
"ignore_pattern": r"__init__\.py",
# force gallery building, unless overridden (see src/Makefile)
"plot_gallery": "'True'",
}

# -----------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 81c4bcf

Please sign in to comment.