Skip to content

Commit d2e84d2

Browse files
committed
Merge branch 'main' into fix_s3_start_byte
2 parents 93711b7 + 1083c9d commit d2e84d2

30 files changed

+854
-222
lines changed

.github/workflows/ci-additional.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,64 @@ jobs:
134134
name: codecov-umbrella
135135
fail_ci_if_error: false
136136

137+
mypy38:
138+
name: Mypy 3.8
139+
runs-on: "ubuntu-latest"
140+
needs: detect-ci-trigger
141+
# temporarily skipping due to https://github.com/pydata/xarray/issues/6551
142+
if: needs.detect-ci-trigger.outputs.triggered == 'false'
143+
defaults:
144+
run:
145+
shell: bash -l {0}
146+
env:
147+
CONDA_ENV_FILE: ci/requirements/environment.yml
148+
PYTHON_VERSION: "3.8"
149+
150+
steps:
151+
- uses: actions/checkout@v3
152+
with:
153+
fetch-depth: 0 # Fetch all history for all branches and tags.
154+
155+
- name: set environment variables
156+
run: |
157+
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
158+
- name: Setup micromamba
159+
uses: mamba-org/provision-with-micromamba@v14
160+
with:
161+
environment-file: ${{env.CONDA_ENV_FILE}}
162+
environment-name: xarray-tests
163+
extra-specs: |
164+
python=${{env.PYTHON_VERSION}}
165+
conda
166+
cache-env: true
167+
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
168+
- name: Install xarray
169+
run: |
170+
python -m pip install --no-deps -e .
171+
- name: Version info
172+
run: |
173+
conda info -a
174+
conda list
175+
python xarray/util/print_versions.py
176+
- name: Install mypy
177+
run: |
178+
python -m pip install 'mypy<0.990'
179+
180+
- name: Run mypy
181+
run: |
182+
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
183+
184+
- name: Upload mypy coverage to Codecov
185+
uses: codecov/codecov-action@v3.1.1
186+
with:
187+
file: mypy_report/cobertura.xml
188+
flags: mypy38
189+
env_vars: PYTHON_VERSION
190+
name: codecov-umbrella
191+
fail_ci_if_error: false
192+
193+
194+
137195
min-version-policy:
138196
name: Minimum Version Policy
139197
runs-on: "ubuntu-latest"

.github/workflows/upstream-dev-ci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ jobs:
8080
if: success()
8181
id: status
8282
run: |
83+
export ZARR_V3_EXPERIMENTAL_API=1
8384
python -m pytest --timeout=60 -rf \
8485
--report-log output-${{ matrix.python-version }}-log.jsonl
8586
- name: Generate and publish the report

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ repos:
4747
# - id: velin
4848
# args: ["--write", "--compact"]
4949
- repo: https://github.com/pre-commit/mirrors-mypy
50-
rev: v0.990
50+
rev: v0.991
5151
hooks:
5252
- id: mypy
5353
# Copied from setup.cfg

ci/requirements/all-but-dask.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ dependencies:
3030
- pip
3131
- pseudonetcdf
3232
- pydap
33-
# - pynio # not compatible with netCDF4>1.5.3, see #4491
3433
- pytest
3534
- pytest-cov
3635
- pytest-env

ci/requirements/environment-windows.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ dependencies:
3030
- pre-commit
3131
- pseudonetcdf
3232
- pydap
33-
# - pynio # Not available on Windows
3433
- pytest
3534
- pytest-cov
3635
- pytest-env

ci/requirements/environment.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ dependencies:
3434
- pre-commit
3535
- pseudonetcdf
3636
- pydap
37-
# - pynio # not compatible with netCDF4>1.5.3, see #4491
3837
- pytest
3938
- pytest-cov
4039
- pytest-env

ci/requirements/min-all-deps.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ dependencies:
4040
- pip
4141
- pseudonetcdf=3.2
4242
- pydap=3.2
43-
# - pynio=1.5.5 # see: https://github.com/pydata/xarray/issues/4491
4443
- pytest
4544
- pytest-cov
4645
- pytest-env

doc/user-guide/io.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,6 +1209,10 @@ We recommend installing cfgrib via conda::
12091209
Formats supported by PyNIO
12101210
--------------------------
12111211

1212+
.. warning::
1213+
1214+
The PyNIO backend is deprecated_. PyNIO is no longer maintained_. See
1215+
12121216
Xarray can also read GRIB, HDF4 and other file formats supported by PyNIO_,
12131217
if PyNIO is installed. To use PyNIO to read such files, supply
12141218
``engine='pynio'`` to :py:func:`open_dataset`.
@@ -1217,12 +1221,9 @@ We recommend installing PyNIO via conda::
12171221

12181222
conda install -c conda-forge pynio
12191223

1220-
.. warning::
1221-
1222-
PyNIO is no longer actively maintained and conflicts with netcdf4 > 1.5.3.
1223-
The PyNIO backend may be moved outside of xarray in the future.
1224-
12251224
.. _PyNIO: https://www.pyngl.ucar.edu/Nio.shtml
1225+
.. _deprecated: https://github.com/pydata/xarray/issues/4491
1226+
.. _maintained: https://github.com/NCAR/pynio/issues/53
12261227

12271228
.. _io.PseudoNetCDF:
12281229

doc/whats-new.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,18 @@ What's New
1414
1515
np.random.seed(123456)
1616
17-
1817
.. _whats-new.2022.11.1:
1918

2019
v2022.11.1 (unreleased)
2120
-----------------------
2221

2322
New Features
2423
~~~~~~~~~~~~
25-
24+
- Enable using `offset` and `origin` arguments in :py:meth:`DataArray.resample`
25+
and :py:meth:`Dataset.resample` (:issue:`7266`, :pull:`6538`). By `Spencer
26+
Clark <https://github.com/spencerkclark>`_.
27+
- Add experimental support for Zarr's in-progress V3 specification. (:pull:`6475`).
28+
By `Gregory Lee <https://github.com/grlee77>`_ and `Joe Hamman <https://github.com/jhamman>`_.
2629

2730
Breaking changes
2831
~~~~~~~~~~~~~~~~
@@ -49,13 +52,16 @@ Breaking changes
4952

5053
Deprecations
5154
~~~~~~~~~~~~
52-
55+
- The PyNIO backend has been deprecated (:issue:`4491`, :pull:`7301`).
56+
By `Joe Hamman <https://github.com/jhamman>`_.
5357

5458
Bug fixes
5559
~~~~~~~~~
5660

5761
- Import ``nc_time_axis`` when needed (:issue:`7275`, :pull:`7276`).
5862
By `Michael Niklas <https://github.com/headtr1ck>`_.
63+
- Fix static typing of :py:meth:`xr.polyval` (:issue:`7312`, :pull:`7315`).
64+
By `Michael Niklas <https://github.com/headtr1ck>`_.
5965
- Fix multiple reads on fsspec S3 files by resetting file pointer to 0 when reading file streams (:issue:`6813`, :pull:`7304`).
6066
By `David Hoese <https://github.com/djhoese>`_ and `Wei Ji Leong <https://github.com/weiji14>`_.
6167

pyproject.toml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ module = [
4040
"cfgrib.*",
4141
"cftime.*",
4242
"cupy.*",
43-
"dask.*",
44-
"distributed.*",
4543
"fsspec.*",
4644
"h5netcdf.*",
4745
"h5py.*",
@@ -52,11 +50,9 @@ module = [
5250
"Nio.*",
5351
"nc_time_axis.*",
5452
"numbagg.*",
55-
"numpy.*",
5653
"netCDF4.*",
5754
"netcdftime.*",
5855
"pandas.*",
59-
"pint.*",
6056
"pooch.*",
6157
"PseudoNetCDF.*",
6258
"pydap.*",
@@ -70,8 +66,6 @@ module = [
7066
"zarr.*",
7167
]
7268

73-
# version spanning code is hard to type annotate (and most of this module will
74-
# be going away soon anyways)
7569
[[tool.mypy.overrides]]
7670
ignore_errors = true
77-
module = "xarray.core.pycompat"
71+
module = []

0 commit comments

Comments
 (0)