Skip to content

Commit eeabc34

Browse files
authored
#226 Merge pull request from astropenguin/astropenguin/issue225
Release v1.8.0
2 parents 433e67e + 8f45e99 commit eeabc34

File tree

12 files changed

+471
-503
lines changed

12 files changed

+471
-503
lines changed

CITATION.cff

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ cff-version: 1.2.0
22
message: "If you use this software, please cite it as below."
33

44
title: "xarray-dataclasses"
5-
abstract: "xarray data creation made easy by dataclass"
6-
version: 1.7.0
7-
date-released: 2023-10-16
5+
abstract: "xarray data creation by data classes"
6+
version: 1.8.0
7+
date-released: 2024-06-13
88
license: "MIT"
99
doi: "10.5281/zenodo.4624819"
1010
url: "https://github.com/astropenguin/xarray-dataclasses"

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020-2023 Akio Taniguchi
3+
Copyright (c) 2020-2024 Akio Taniguchi
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![DOI](https://img.shields.io/badge/DOI-10.5281/zenodo.4624819-cornflowerblue?style=flat-square)](https://doi.org/10.5281/zenodo.4624819)
77
[![Tests](https://img.shields.io/github/actions/workflow/status/astropenguin/xarray-dataclasses/tests.yml?label=Tests&style=flat-square)](https://github.com/astropenguin/xarray-dataclasses/actions)
88

9-
xarray data creation made easy by dataclass
9+
xarray data creation by data classes
1010

1111
## Overview
1212

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# project information
22
author = "Akio Taniguchi"
3-
copyright = "2020-2023 Akio Taniguchi"
3+
copyright = "2020-2024 Akio Taniguchi"
44

55

66
# general configuration

poetry.lock

Lines changed: 421 additions & 427 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tool.poetry]
22
name = "xarray-dataclasses"
3-
version = "1.7.0"
4-
description = "xarray data creation made easy by dataclass"
3+
version = "1.8.0"
4+
description = "xarray data creation by data classes"
55
authors = ["Akio Taniguchi <[email protected]>"]
66
keywords = ["xarray", "dataclass", "dataarray", "dataset", "typing"]
77
license = "MIT"
@@ -19,16 +19,16 @@ numpy = [
1919
typing-extensions = "^4.0"
2020
xarray = [
2121
{ version = ">=2022.3, <2023.2", python = ">=3.8, <3.9" },
22-
{ version = ">=2022.3, <2024.0", python = ">=3.9, <3.13" },
22+
{ version = ">=2022.3, <2025.0", python = ">=3.9, <3.13" },
2323
]
2424

2525
[tool.poetry.group.dev.dependencies]
26-
black = "^23.9"
26+
black = "^24.4"
2727
ipython = "^8.12"
28-
myst-parser = "^2.0"
28+
myst-parser = "^3.0"
2929
pydata-sphinx-theme = "^0.14"
3030
pyright = "^1.1"
31-
pytest = "^7.4"
31+
pytest = "^8.2"
3232
sphinx = "^7.1"
3333

3434
[tool.pyright]

xarray_dataclasses/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"dataoptions",
1818
"typing",
1919
]
20-
__version__ = "1.7.0"
20+
__version__ = "1.8.0"
2121

2222

2323
# submodules

xarray_dataclasses/dataarray.py

Lines changed: 16 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Submodule for DataArray creation."""
2+
23
__all__ = ["AsDataArray", "asdataarray"]
34

45

@@ -38,26 +39,23 @@ def asdataarray(
3839
dataclass: OptionedClass[PInit, TDataArray],
3940
reference: Optional[AnyXarray] = None,
4041
dataoptions: None = None,
41-
) -> TDataArray:
42-
...
42+
) -> TDataArray: ...
4343

4444

4545
@overload
4646
def asdataarray(
4747
dataclass: DataClass[PInit],
4848
reference: Optional[AnyXarray] = None,
4949
dataoptions: None = None,
50-
) -> xr.DataArray:
51-
...
50+
) -> xr.DataArray: ...
5251

5352

5453
@overload
5554
def asdataarray(
5655
dataclass: Any,
5756
reference: Optional[AnyXarray] = None,
5857
dataoptions: DataOptions[TDataArray] = DataOptions(xr.DataArray),
59-
) -> TDataArray:
60-
...
58+
) -> TDataArray: ...
6159

6260

6361
def asdataarray(
@@ -119,16 +117,14 @@ def __get__(
119117
self,
120118
obj: Any,
121119
cls: Type[OptionedClass[PInit, TDataArray]],
122-
) -> Callable[PInit, TDataArray]:
123-
...
120+
) -> Callable[PInit, TDataArray]: ...
124121

125122
@overload
126123
def __get__(
127124
self,
128125
obj: Any,
129126
cls: Type[DataClass[PInit]],
130-
) -> Callable[PInit, xr.DataArray]:
131-
...
127+
) -> Callable[PInit, xr.DataArray]: ...
132128

133129
def __get__(self, obj: Any, cls: Any) -> Any:
134130
return self.__func__(cls)
@@ -158,8 +154,7 @@ def shaped(
158154
func: Callable[[Shape], AnyArray],
159155
shape: Union[Shape, Sizes],
160156
**kwargs: Any,
161-
) -> TDataArray:
162-
...
157+
) -> TDataArray: ...
163158

164159
@overload
165160
@classmethod
@@ -168,8 +163,7 @@ def shaped(
168163
func: Callable[[Shape], AnyArray],
169164
shape: Union[Shape, Sizes],
170165
**kwargs: Any,
171-
) -> xr.DataArray:
172-
...
166+
) -> xr.DataArray: ...
173167

174168
@classmethod
175169
def shaped(
@@ -204,8 +198,7 @@ def empty(
204198
shape: Union[Shape, Sizes],
205199
order: Order = "C",
206200
**kwargs: Any,
207-
) -> TDataArray:
208-
...
201+
) -> TDataArray: ...
209202

210203
@overload
211204
@classmethod
@@ -214,8 +207,7 @@ def empty(
214207
shape: Union[Shape, Sizes],
215208
order: Order = "C",
216209
**kwargs: Any,
217-
) -> xr.DataArray:
218-
...
210+
) -> xr.DataArray: ...
219211

220212
@classmethod
221213
def empty(
@@ -246,8 +238,7 @@ def zeros(
246238
shape: Union[Shape, Sizes],
247239
order: Order = "C",
248240
**kwargs: Any,
249-
) -> TDataArray:
250-
...
241+
) -> TDataArray: ...
251242

252243
@overload
253244
@classmethod
@@ -256,8 +247,7 @@ def zeros(
256247
shape: Union[Shape, Sizes],
257248
order: Order = "C",
258249
**kwargs: Any,
259-
) -> xr.DataArray:
260-
...
250+
) -> xr.DataArray: ...
261251

262252
@classmethod
263253
def zeros(
@@ -288,8 +278,7 @@ def ones(
288278
shape: Union[Shape, Sizes],
289279
order: Order = "C",
290280
**kwargs: Any,
291-
) -> TDataArray:
292-
...
281+
) -> TDataArray: ...
293282

294283
@overload
295284
@classmethod
@@ -298,8 +287,7 @@ def ones(
298287
shape: Union[Shape, Sizes],
299288
order: Order = "C",
300289
**kwargs: Any,
301-
) -> xr.DataArray:
302-
...
290+
) -> xr.DataArray: ...
303291

304292
@classmethod
305293
def ones(
@@ -331,8 +319,7 @@ def full(
331319
fill_value: Any,
332320
order: Order = "C",
333321
**kwargs: Any,
334-
) -> TDataArray:
335-
...
322+
) -> TDataArray: ...
336323

337324
@overload
338325
@classmethod
@@ -342,8 +329,7 @@ def full(
342329
fill_value: Any,
343330
order: Order = "C",
344331
**kwargs: Any,
345-
) -> xr.DataArray:
346-
...
332+
) -> xr.DataArray: ...
347333

348334
@classmethod
349335
def full(

xarray_dataclasses/datamodel.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Submodule for data expression inside the package."""
2+
23
__all__ = ["DataModel"]
34

45

xarray_dataclasses/dataoptions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Submodule for customization of DataArray or Dataset creation."""
2+
23
__all__ = ["DataOptions"]
34

45

0 commit comments

Comments
 (0)