Skip to content

Commit

Permalink
Merge branch 'any-time-resolution-2' into ig/fix_extension_indexer
Browse files Browse the repository at this point in the history
  • Loading branch information
ilan-gold committed Jan 7, 2025
2 parents 8a3e834 + 0e886d6 commit 80dc10b
Show file tree
Hide file tree
Showing 52 changed files with 1,297 additions and 924 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci-additional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
- name: Upload mypy coverage to Codecov
uses: codecov/[email protected].1
uses: codecov/[email protected].2
with:
file: mypy_report/cobertura.xml
flags: mypy
Expand Down Expand Up @@ -174,7 +174,7 @@ jobs:
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
- name: Upload mypy coverage to Codecov
uses: codecov/[email protected].1
uses: codecov/[email protected].2
with:
file: mypy_report/cobertura.xml
flags: mypy-min
Expand Down Expand Up @@ -230,7 +230,7 @@ jobs:
python -m pyright xarray/
- name: Upload pyright coverage to Codecov
uses: codecov/[email protected].1
uses: codecov/[email protected].2
with:
file: pyright_report/cobertura.xml
flags: pyright
Expand Down Expand Up @@ -286,7 +286,7 @@ jobs:
python -m pyright xarray/
- name: Upload pyright coverage to Codecov
uses: codecov/[email protected].1
uses: codecov/[email protected].2
with:
file: pyright_report/cobertura.xml
flags: pyright39
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ jobs:
path: pytest.xml

- name: Upload code coverage to Codecov
uses: codecov/[email protected].1
uses: codecov/[email protected].2
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pypi-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
path: dist
- name: Publish package to TestPyPI
if: github.event_name == 'push'
uses: pypa/[email protected].2
uses: pypa/[email protected].3
with:
repository_url: https://test.pypi.org/legacy/
verbose: true
Expand All @@ -110,6 +110,6 @@ jobs:
name: releases
path: dist
- name: Publish package to PyPI
uses: pypa/[email protected].2
uses: pypa/[email protected].3
with:
verbose: true
2 changes: 1 addition & 1 deletion .github/workflows/upstream-dev-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
run: |
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
- name: Upload mypy coverage to Codecov
uses: codecov/[email protected].1
uses: codecov/[email protected].2
with:
file: mypy_report/cobertura.xml
flags: mypy
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ repos:
- id: text-unicode-replacement-char
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.8.1
rev: v0.8.6
hooks:
- id: ruff-format
- id: ruff
Expand All @@ -37,12 +37,12 @@ repos:
exclude: "generate_aggregations.py"
additional_dependencies: ["black==24.8.0"]
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.4.1
rev: v3.4.2
hooks:
- id: prettier
args: [--cache-location=.prettier_cache/cache]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
rev: v1.14.1
hooks:
- id: mypy
# Copied from setup.cfg
Expand Down
7 changes: 4 additions & 3 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
version: 2

sphinx:
configuration: doc/conf.py
fail_on_warning: true

build:
os: ubuntu-lts-latest
tools:
Expand All @@ -14,7 +18,4 @@ build:
conda:
environment: ci/requirements/doc.yml

sphinx:
fail_on_warning: true

formats: []
2 changes: 1 addition & 1 deletion asv_bench/benchmarks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def randn(shape, frac_nan=None, chunks=None, seed=0):

def randint(low, high=None, size=None, frac_minus=None, seed=0):
rng = np.random.default_rng(seed)
x = rng.randint(low, high, size)
x = rng.integers(low, high, size)
if frac_minus is not None:
inds = rng.choice(range(x.size), int(x.size * frac_minus))
x.flat[inds] = -1
Expand Down
5 changes: 4 additions & 1 deletion asv_bench/benchmarks/rolling.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import xarray as xr

from . import parameterized, randn, requires_dask
from . import _skip_slow, parameterized, randn, requires_dask

nx = 3000
long_nx = 30000
Expand Down Expand Up @@ -80,6 +80,9 @@ def time_rolling_construct(self, center, stride, use_bottleneck):
class RollingDask(Rolling):
def setup(self, *args, **kwargs):
requires_dask()
# TODO: Lazily skipped in CI as it is very demanding and slow.
# Improve times and remove errors.
_skip_slow()
super().setup(**kwargs)
self.ds = self.ds.chunk({"x": 100, "y": 50, "t": 50})
self.da_long = self.da_long.chunk({"x": 10000})
Expand Down
15 changes: 14 additions & 1 deletion doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ Creating a dataset

Dataset
decode_cf
CFDatetimeCoder

Attributes
----------
Expand Down Expand Up @@ -627,12 +626,14 @@ Attributes relating to the recursive tree-like structure of a ``DataTree``.
DataTree.depth
DataTree.width
DataTree.subtree
DataTree.subtree_with_keys
DataTree.descendants
DataTree.siblings
DataTree.lineage
DataTree.parents
DataTree.ancestors
DataTree.groups
DataTree.xindexes

Data Contents
-------------
Expand All @@ -646,6 +647,7 @@ This interface echoes that of ``xarray.Dataset``.
DataTree.dims
DataTree.sizes
DataTree.data_vars
DataTree.ds
DataTree.coords
DataTree.attrs
DataTree.encoding
Expand Down Expand Up @@ -1094,6 +1096,17 @@ DataTree methods
.. Missing:
.. ``open_mfdatatree``
Encoding/Decoding
=================

Coder objects
-------------

.. autosummary::
:toctree: generated/

coders.CFDatetimeCoder

Coordinates objects
===================

Expand Down
Loading

0 comments on commit 80dc10b

Please sign in to comment.