Skip to content

Commit 3dc8fb0

Browse files
committed
CHanges
1 parent 6d8ee3a commit 3dc8fb0

3 files changed

Lines changed: 133 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,11 @@ docs = [
5454
requires = ["setuptools>=61.0.0", "wheel", "setuptools_scm[toml]>=6.2"]
5555
build-backend = "setuptools.build_meta"
5656

57-
[tool.setuptools.packages.find]
58-
include = ["xarray_plotly*"]
57+
[tool.setuptools]
58+
packages = ["xarray_plotly", "xarray-stubs"]
59+
60+
[tool.setuptools.package-data]
61+
"*" = ["py.typed", "*.pyi"]
5962

6063
[tool.setuptools_scm]
6164
version_scheme = "post-release"

xarray-stubs/__init__.pyi

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
"""Partial stubs extending xarray.DataArray with plotly accessor."""
2+
3+
from xarray import (
4+
ALL_DIMS as ALL_DIMS,
5+
)
6+
from xarray import (
7+
Coordinates as Coordinates,
8+
)
9+
from xarray import (
10+
Dataset as Dataset,
11+
)
12+
from xarray import (
13+
DataTree as DataTree,
14+
)
15+
from xarray import (
16+
IndexVariable as IndexVariable,
17+
)
18+
from xarray import (
19+
Variable as Variable,
20+
)
21+
from xarray import (
22+
apply_ufunc as apply_ufunc,
23+
)
24+
from xarray import (
25+
broadcast as broadcast,
26+
)
27+
from xarray import (
28+
cftime_range as cftime_range,
29+
)
30+
from xarray import (
31+
concat as concat,
32+
)
33+
from xarray import (
34+
conventions as conventions,
35+
)
36+
from xarray import (
37+
date_range as date_range,
38+
)
39+
from xarray import (
40+
decode_cf as decode_cf,
41+
)
42+
from xarray import (
43+
dot as dot,
44+
)
45+
from xarray import (
46+
full_like as full_like,
47+
)
48+
from xarray import (
49+
group_subtrees as group_subtrees,
50+
)
51+
from xarray import (
52+
infer_freq as infer_freq,
53+
)
54+
from xarray import (
55+
load_dataarray as load_dataarray,
56+
)
57+
from xarray import (
58+
load_dataset as load_dataset,
59+
)
60+
from xarray import (
61+
map_blocks as map_blocks,
62+
)
63+
from xarray import (
64+
merge as merge,
65+
)
66+
from xarray import (
67+
ones_like as ones_like,
68+
)
69+
from xarray import (
70+
open_dataarray as open_dataarray,
71+
)
72+
from xarray import (
73+
open_dataset as open_dataset,
74+
)
75+
from xarray import (
76+
open_datatree as open_datatree,
77+
)
78+
from xarray import (
79+
open_groups as open_groups,
80+
)
81+
from xarray import (
82+
open_mfdataset as open_mfdataset,
83+
)
84+
from xarray import (
85+
open_zarr as open_zarr,
86+
)
87+
from xarray import (
88+
polyval as polyval,
89+
)
90+
from xarray import (
91+
register_dataarray_accessor as register_dataarray_accessor,
92+
)
93+
from xarray import (
94+
register_dataset_accessor as register_dataset_accessor,
95+
)
96+
from xarray import (
97+
save_mfdataset as save_mfdataset,
98+
)
99+
from xarray import (
100+
set_options as set_options,
101+
)
102+
from xarray import (
103+
show_versions as show_versions,
104+
)
105+
from xarray import (
106+
testing as testing,
107+
)
108+
from xarray import (
109+
tutorial as tutorial,
110+
)
111+
from xarray import (
112+
unify_chunks as unify_chunks,
113+
)
114+
from xarray import (
115+
where as where,
116+
)
117+
from xarray import (
118+
zeros_like as zeros_like,
119+
)
120+
from xarray.core.dataarray import DataArray as _OriginalDataArray
121+
122+
from xarray_plotly.accessor import DataArrayPlotlyAccessor
123+
124+
# Extend DataArray with the plotly accessor
125+
class DataArray(_OriginalDataArray):
126+
@property
127+
def plotly(self) -> DataArrayPlotlyAccessor: ...

xarray-stubs/py.typed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
partial

0 commit comments

Comments
 (0)