Skip to content

Xarray read/write via netCDF4 dataset api adapter. #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
env:
IRIS_TEST_DATA_LOC_PATH: benchmarks
IRIS_TEST_DATA_PATH: benchmarks/iris-test-data
IRIS_TEST_DATA_VERSION: "2.12"
IRIS_TEST_DATA_VERSION: "2.14"
# Lets us manually bump the cache to rebuild
ENV_CACHE_BUILD: "0"
TEST_DATA_CACHE_BUILD: "2"
Expand Down
94 changes: 0 additions & 94 deletions .github/workflows/ci-docs-linkcheck.yml

This file was deleted.

10 changes: 6 additions & 4 deletions .github/workflows/ci-docs-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ concurrency:

jobs:
tests:
name: "doctests ${{ matrix.os }} ${{ matrix.python-version }}"
name: "${{ matrix.session }} ${{ matrix.os }} py${{ matrix.python-version }}"

runs-on: ${{ matrix.os }}

Expand All @@ -32,12 +32,14 @@ jobs:
shell: bash -l {0}

strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.8"]
session: ["doctest", "gallery", "linkcheck"]

env:
IRIS_TEST_DATA_VERSION: "2.12"
IRIS_TEST_DATA_VERSION: "2.14"
ENV_NAME: "ci-docs-tests"

steps:
Expand Down Expand Up @@ -120,8 +122,8 @@ jobs:
echo "image.cmap : viridis" >> ${MPL_RC}
cat ${MPL_RC}

- name: "iris doctests and gallery"
- name: "iris ${{ matrix.session }}"
env:
PY_VER: ${{ matrix.python-version }}
run: |
nox --session doctest -- --verbose
nox --session ${{ matrix.session }} -- --verbose
9 changes: 5 additions & 4 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ concurrency:

jobs:
tests:
name: "tests ${{ matrix.os }} ${{ matrix.python-version }}"
name: "${{ matrix.session }} ${{ matrix.os }} py${{ matrix.python-version }}"

runs-on: ${{ matrix.os }}

Expand All @@ -36,9 +36,10 @@ jobs:
matrix:
os: ["ubuntu-latest"]
python-version: ["3.8"]
session: ["tests"]

env:
IRIS_TEST_DATA_VERSION: "2.12"
IRIS_TEST_DATA_VERSION: "2.14"
ENV_NAME: "ci-tests"

steps:
Expand Down Expand Up @@ -115,8 +116,8 @@ jobs:
echo "doc_dir = ${GITHUB_WORKSPACE}/docs" >> ${SITE_CFG}
cat ${SITE_CFG}

- name: "iris tests"
- name: "iris ${{ matrix.session }}"
env:
PY_VER: ${{ matrix.python-version }}
run: |
nox --session tests -- --verbose
nox --session ${{ matrix.session }} -- --verbose
2 changes: 1 addition & 1 deletion .github/workflows/composite/nox-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ runs:
- uses: actions/cache@v3
with:
path: ${{ github.workspace }}/.nox
key: ${{ runner.os }}-nox-${{ inputs.env_name }}-py${{ matrix.python-version }}-b${{ inputs.cache_build }}-${{ hashFiles(inputs.lock_file) }}
key: ${{ runner.os }}-nox-${{ inputs.env_name }}-s${{ matrix.session }}-py${{ matrix.python-version }}-b${{ inputs.cache_build }}-${{ hashFiles(inputs.lock_file) }}
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
<a href="https://github.com/SciTools/iris/actions/workflows/ci-docs-tests.yml">
<img src="https://github.com/SciTools/iris/actions/workflows/ci-docs-tests.yml/badge.svg?branch=main"
alt="ci-docs-tests"></a>
<a href="https://github.com/SciTools/iris/actions/workflows/ci-docs-linkcheck.yml">
<img src="https://github.com/SciTools/iris/actions/workflows/ci-docs-linkcheck.yml/badge.svg?branch=main"
alt="ci-docs-linkcheck"></a>
<a href="https://scitools-iris.readthedocs.io/en/latest/?badge=latest">
<img src="https://readthedocs.org/projects/scitools-iris/badge/?version=latest"
alt="Documentation Status"></a>
Expand Down
10 changes: 8 additions & 2 deletions docs/src/whatsnew/latest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ This document explains the changes made to Iris for this release
:func:`numpy.percentile` keywords through the :obj:`~iris.analysis.PERCENTILE`
aggregator. (:pull:`4791`)

#. `@wjbenfold`_ and `@bjlittle`_ (reviewer) implemented
:func:`iris.plot.fill_between` and :func:`iris.quickplot.fill_between`.
(:issue:`3493`, :pull:`4647`)


🐛 Bugs Fixed
=============
Expand Down Expand Up @@ -119,10 +123,10 @@ This document explains the changes made to Iris for this release
#. `@wjbenfold`_ and `@rcomer`_ (reviewer) corrected the axis on which masking
is applied when an aggregator adds a trailing dimension. (:pull:`4755`)

* `@rcomer`_ and `@pp-mo`_ ensured that all methods to create or modify a
#. `@rcomer`_ and `@pp-mo`_ ensured that all methods to create or modify a
:class:`iris.cube.CubeList` check that it only contains cubes. According to
code comments, this was supposedly already the case, but there were several bugs
and loopholes.
and loopholes. (:issue:`1897`, :pull:`4767`)


💣 Incompatible Changes
Expand Down Expand Up @@ -167,6 +171,8 @@ This document explains the changes made to Iris for this release
we no longer use the deprecated :class:`nc_time_axis.CalendarDateTime`
when plotting against time coordinates. (:pull:`4584`)

#. `@wjbenfold`_ and `@bjlittle`_ (reviewer) unpinned ``pillow``. (:pull:`4826`)


📚 Documentation
================
Expand Down
9 changes: 7 additions & 2 deletions lib/iris/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ def callback(cube, field, filename):

"""

from collections import Iterable
import contextlib
import glob
import itertools
import os.path
import pathlib
import threading

import iris._constraints
Expand Down Expand Up @@ -247,7 +247,8 @@ def context(self, **kwargs):

def _generate_cubes(uris, callback, constraints):
"""Returns a generator of cubes given the URIs and a callback."""
if isinstance(uris, (str, pathlib.PurePath)):
if isinstance(uris, str) or not isinstance(uris, Iterable):
# Make a string, or other single item, into an iterable.
uris = [uris]

# Group collections of uris by their iris handler
Expand All @@ -264,6 +265,10 @@ def _generate_cubes(uris, callback, constraints):
urls = [":".join(x) for x in groups]
for cube in iris.io.load_http(urls, callback):
yield cube
elif scheme == "data":
data_objects = [x[1] for x in groups]
for cube in iris.io.load_data_objects(data_objects, callback):
yield cube
else:
raise ValueError("Iris cannot handle the URI scheme: %s" % scheme)

Expand Down
Loading