Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into dark_theme
Browse files Browse the repository at this point in the history
* upstream/main: (23 commits)
  Lockfiles and pydata-sphinx-theme fix (SciTools#5188)
  Allow smarter weights (cubes, coordinates, cell measures, or ancillary variables) for aggregation (SciTools#5084)
  removed cell measure mask check and error (SciTools#5181)
  Updated environment lockfiles (SciTools#5177)
  Lazy weighted RMS calculation (SciTools#5017)
  Add coverage badge to README.md (SciTools#5176)
  Add coverage testing (SciTools#4765)
  Whats new updates for v3.4.1 .
  NetCDF thread safety take two (SciTools#5095)
  Updated environment lockfiles (SciTools#5163)
  Plugin support (SciTools#5144)
  Expand scope of common contributor links (SciTools#5159)
  Replace apparently retired UDUNITS documentation link. (SciTools#5153)
  [pre-commit.ci] pre-commit autoupdate (SciTools#5150)
  Fixing typo's in Gitwash. (SciTools#5145)
  add readme #showyourstripes (SciTools#5141)
  [pre-commit.ci] pre-commit autoupdate (SciTools#5143)
  Iris ❤ Xarray docs page. (SciTools#5025)
  [pre-commit.ci] pre-commit autoupdate (SciTools#5136)
  Updated citation (SciTools#5116)
  ...
  • Loading branch information
tkknight committed Mar 11, 2023
2 parents 163b56f + e2dc89c commit c1e6e47
Show file tree
Hide file tree
Showing 137 changed files with 3,701 additions and 2,199 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ jobs:
matrix:
os: ["ubuntu-latest"]
python-version: ["3.10"]
session: ["tests", "doctest", "gallery", "linkcheck"]
session: ["doctest", "gallery", "linkcheck"]
include:
- os: "ubuntu-latest"
python-version: "3.10"
session: "tests"
coverage: "--coverage"
- os: "ubuntu-latest"
python-version: "3.9"
session: "tests"
Expand Down Expand Up @@ -133,4 +137,8 @@ jobs:
env:
PY_VER: ${{ matrix.python-version }}
run: |
nox --session ${{ matrix.session }} -- --verbose
nox --session ${{ matrix.session }} -- --verbose ${{ matrix.coverage }}
- name: Upload coverage report
uses: codecov/codecov-action@v3
if: ${{ matrix.coverage }}
7 changes: 3 additions & 4 deletions .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/psf/black
rev: 22.12.0
rev: 23.1.0
hooks:
- id: black
pass_filenames: false
Expand All @@ -43,18 +43,17 @@ repos:
args: [--config=./setup.cfg]

- repo: https://github.com/pycqa/isort
rev: 5.11.4
rev: 5.12.0
hooks:
- id: isort
types: [file, python]
args: [--filter-files]

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

- repo: https://github.com/aio-libs/sort-all
rev: v1.2.0
Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
<a href="https://results.pre-commit.ci/latest/github/SciTools/iris/main">
<img src="https://results.pre-commit.ci/badge/github/SciTools/iris/main.svg"
alt="pre-commit.ci status"></a>
<a href="https://codecov.io/gh/SciTools/iris">
<img src="https://codecov.io/gh/SciTools/iris/branch/main/graph/badge.svg?token=0GeICSIF3g"
alt="code coverage"></a>
</p>

<p align="center">
Expand Down Expand Up @@ -54,3 +57,24 @@ For documentation see the
developer version or the most recent released
<a href="https://scitools-iris.readthedocs.io/en/stable/">stable</a> version.
</p>

## [#ShowYourStripes](https://showyourstripes.info/s/globe)

<h4 align="center">
<a href="https://showyourstripes.info/s/globe">
<img src="https://raw.githubusercontent.com/ed-hawkins/show-your-stripes/master/2021/GLOBE---1850-2021-MO.png"
height="50" width="800"
alt="#showyourstripes Global 1850-2021"></a>
</h4>

**Graphics and Lead Scientist**: [Ed Hawkins](http://www.met.reading.ac.uk/~ed/home/index.php), National Centre for Atmospheric Science, University of Reading.

**Data**: Berkeley Earth, NOAA, UK Met Office, MeteoSwiss, DWD, SMHI, UoR, Meteo France & ZAMG.

<p>
<a href="https://showyourstripes.info/s/globe">#ShowYourStripes</a> is distributed under a
<a href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>
<a href="https://creativecommons.org/licenses/by/4.0/">
<img src="https://i.creativecommons.org/l/by/4.0/80x15.png" alt="creative-commons-by" style="border-width:0"></a>
</p>

2 changes: 1 addition & 1 deletion benchmarks/benchmarks/experimental/ugrid/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def time_create(self, *params):

class Connectivity(UGridCommon):
def setup(self, n_faces):
self.array = np.zeros([n_faces, 3], dtype=np.int)
self.array = np.zeros([n_faces, 3], dtype=int)
super().setup(n_faces)

def create(self):
Expand Down
5 changes: 0 additions & 5 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ html-quick:
echo "make html-quick in $$i..."; \
(cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) html-quick); done

spelling:
@for i in $(SUBDIRS); do \
echo "make spelling in $$i..."; \
(cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) spelling); done

all:
@for i in $(SUBDIRS); do \
echo "make all in $$i..."; \
Expand Down
2 changes: 1 addition & 1 deletion docs/gallery_code/general/plot_custom_aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def main():

# Make an aggregator from the user function.
SPELL_COUNT = Aggregator(
"spell_count", count_spells, units_func=lambda units: 1
"spell_count", count_spells, units_func=lambda units, **kwargs: 1
)

# Define the parameters of the test.
Expand Down
1 change: 0 additions & 1 deletion docs/gallery_code/general/plot_lineplot_with_legend.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def main():
)

for cube in temperature.slices("longitude"):

# Create a string label to identify this cube (i.e. latitude: value).
cube_label = "latitude: %s" % cube.coord("latitude").points[0]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@


def make_plot(projection_name, projection_crs):

# Create a matplotlib Figure.
plt.figure()

Expand Down
1 change: 0 additions & 1 deletion docs/gallery_code/general/plot_zonal_means.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@


def main():

# Loads air_temp.pp and "collapses" longitude into a single, average value.
fname = iris.sample_data_path("air_temp.pp")
temperature = iris.load_cube(fname)
Expand Down
1 change: 0 additions & 1 deletion docs/gallery_code/meteorology/plot_lagged_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ def main():

# Iterate over all possible latitude longitude slices.
for cube in last_timestep.slices(["latitude", "longitude"]):

# Get the ensemble member number from the ensemble coordinate.
ens_member = cube.coord("realization").points[0]

Expand Down
8 changes: 2 additions & 6 deletions docs/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ html-quick:
@echo
@echo "Build finished. The HTML (no gallery or api docs) pages are in $(BUILDDIR)/html"

spelling:
$(SPHINXBUILD) -b spelling $(SRCDIR) $(BUILDDIR)
@echo
@echo "Build finished. The HTML (no gallery) pages are in $(BUILDDIR)/html"

dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
Expand Down Expand Up @@ -156,4 +151,5 @@ doctest:
"results in $(BUILDDIR)/doctest/output.txt."

show:
@python -c "import webbrowser; webbrowser.open_new_tab('file://$(shell pwd)/$(BUILDDIR)/html/index.html')"
@python -c "import webbrowser; webbrowser.open_new_tab('file://$(shell pwd)/$(BUILDDIR)/html/index.html')"

8 changes: 6 additions & 2 deletions docs/src/common_links.inc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
.. _conda: https://docs.conda.io/en/latest/
.. _contributor: https://github.com/SciTools/scitools.org.uk/blob/master/contributors.json
.. _core developers: https://github.com/SciTools/scitools.org.uk/blob/master/contributors.json
.. _generating sss keys for GitHub: https://docs.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account
.. _generating ssh keys for GitHub: https://docs.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account
.. _GitHub Actions: https://docs.github.com/en/actions
.. _GitHub Help Documentation: https://docs.github.com/en/github
.. _GitHub Discussions: https://github.com/SciTools/iris/discussions
Expand Down Expand Up @@ -40,22 +40,26 @@
.. _CF-UGRID: https://ugrid-conventions.github.io/ugrid-conventions/
.. _issues on GitHub: https://github.com/SciTools/iris/issues?q=is%3Aopen+is%3Aissue+sort%3Areactions-%2B1-desc
.. _python-stratify: https://github.com/SciTools/python-stratify
.. _iris-esmf-regrid: https://github.com/SciTools-incubator/iris-esmf-regrid
.. _netCDF4: https://github.com/Unidata/netcdf4-python


.. comment
Core developers (@github names) in alphabetical order:
Core developers and prolific contributors (@github names) in alphabetical order:

.. _@abooton: https://github.com/abooton
.. _@alastair-gemmell: https://github.com/alastair-gemmell
.. _@ajdawson: https://github.com/ajdawson
.. _@bjlittle: https://github.com/bjlittle
.. _@bouweandela: https://github.com/bouweandela
.. _@bsherratt: https://github.com/bsherratt
.. _@corinnebosley: https://github.com/corinnebosley
.. _@cpelley: https://github.com/cpelley
.. _@djkirkham: https://github.com/djkirkham
.. _@DPeterK: https://github.com/DPeterK
.. _@ESadek-MO: https://github.com/ESadek-MO
.. _@esc24: https://github.com/esc24
.. _@HGWright: https://github.com/HGWright
.. _@jamesp: https://github.com/jamesp
.. _@jonseddon: https://github.com/jonseddon
.. _@jvegasbsc: https://github.com/jvegasbsc
Expand Down
58 changes: 58 additions & 0 deletions docs/src/community/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
.. include:: ../common_links.inc

.. todo:
consider scientific-python.org
consider scientific-python.org/specs/
Iris in the Community
=====================

Iris aims to be a valuable member of the open source scientific Python
community.

We listen out for developments in our dependencies and neighbouring projects,
and we reach out to them when we can solve problems together; please feel free
to reach out to us!

We are aware of our place in the user's wider 'toolbox' - offering unique
functionality and interoperating smoothly with other packages.

We welcome contributions from all; whether that's an opinion, a 1-line
clarification, or a whole new feature 🙂

Quick Links
-----------

* `GitHub Discussions`_
* :ref:`Getting involved<development_where_to_start>`
* `Twitter <https://twitter.com/scitools_iris>`_

Interoperability
----------------

There's a big choice of Python tools out there! Each one has strengths and
weaknesses in different areas, so we don't want to force a single choice for your
whole workflow - we'd much rather make it easy for you to choose the right tool
for the moment, switching whenever you need. Below are our ongoing efforts at
smoother interoperability:

.. not using toctree due to combination of child pages and cross-references.
* The :mod:`iris.pandas` module
* :doc:`iris_xarray`

.. toctree::
:maxdepth: 1
:hidden:

iris_xarray

Plugins
-------

Iris can be extended with **plugins**! See below for further information:

.. toctree::
:maxdepth: 2

plugins
Loading

0 comments on commit c1e6e47

Please sign in to comment.