Repository: astropenguin/xarray-dataclasses

Issue:
Release v0.7.0

Discussion:

Patch:
diff --git a/pyproject.toml b/pyproject.toml
index 90fb876..66429b4 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "xarray-dataclasses"
-version = "0.6.1"
+version = "0.7.0"
 description = "xarray extension for typed DataArray and Dataset creation"
 authors = ["Akio Taniguchi <taniguchi@a.phys.nagoya-u.ac.jp>"]
 keywords = ["xarray", "dataclass", "dataarray", "dataset", "typing"]
diff --git a/xarray_dataclasses/__init__.py b/xarray_dataclasses/__init__.py
index 960b42e..398052a 100644
--- a/xarray_dataclasses/__init__.py
+++ b/xarray_dataclasses/__init__.py
@@ -1,10 +1,9 @@
-# flake8: noqa
 # type: ignore
 __author__ = "Akio Taniguchi"
-__version__ = "0.6.1"
+__version__ = "0.7.0"
 
 
-# for Python 3.7 - 3.8
+# for Python 3.7 and 3.8
 def _make_field_generic():
     from dataclasses import Field
     from typing import Sequence
@@ -30,3 +29,7 @@ from .dataset import *
 from .deprecated import *
 from .datamodel import *
 from .typing import *
+
+
+# for Sphinx docs
+__all__ = dir()
diff --git a/xarray_dataclasses/dataarray.py b/xarray_dataclasses/dataarray.py
index 40e6a4a..eef5d22 100644
--- a/xarray_dataclasses/dataarray.py
+++ b/xarray_dataclasses/dataarray.py
@@ -1,11 +1,11 @@
-__all__ = ["asdataarray", "AsDataArray"]
+__all__ = ["AsDataArray", "asdataarray"]
 
 
 # standard library
 from dataclasses import Field
 from functools import wraps
 from types import MethodType
-from typing import Any, Callable, Dict, overload, Sequence, Type, TypeVar, Union
+from typing import Any, Callable, Dict, Sequence, Type, TypeVar, Union, overload
 
 
 # dependencies
@@ -42,7 +42,7 @@ class DataArrayClass(Protocol[P, TDataArray_]):
     __dataarray_factory__: Callable[..., TDataArray_]
 
 
-# runtime classes
+# custom classproperty
 class classproperty:
     """Class property only for AsDataArray.new().
 
diff --git a/xarray_dataclasses/dataset.py b/xarray_dataclasses/dataset.py
index 9e596b1..0e73cdb 100644
--- a/xarray_dataclasses/dataset.py
+++ b/xarray_dataclasses/dataset.py
@@ -1,11 +1,11 @@
-__all__ = ["asdataset", "AsDataset"]
+__all__ = ["AsDataset", "asdataset"]
 
 
 # standard library
 from dataclasses import Field
 from functools import wraps
 from types import MethodType
-from typing import Any, Callable, Dict, overload, Type, TypeVar
+from typing import Any, Callable, Dict, Type, TypeVar, overload
 
 
 # dependencies
@@ -39,7 +39,7 @@ class DatasetClass(Protocol[P, TDataset_]):
     __dataset_factory__: Callable[..., TDataset_]
 
 
-# runtime classes
+# custom classproperty
 class classproperty:
     """Class property only for AsDataset.new().
 
@@ -59,7 +59,7 @@ class classproperty:
         return self.__func__(cls)
 
 
-# runtime functions
+# runtime functions and classes
 @overload
 def asdataset(
     dataclass: DatasetClass[Any, TDataset],
diff --git a/xarray_dataclasses/deprecated.py b/xarray_dataclasses/deprecated.py
index 6644937..e2d2c6f 100644
--- a/xarray_dataclasses/deprecated.py
+++ b/xarray_dataclasses/deprecated.py
@@ -1,5 +1,5 @@
 """Submodule for functions that will be deprecated in v1.0.0."""
-__all__ = ["dataarrayclass", "datasetclass", "get_type_hints"]
+__all__ = ["dataarrayclass", "datasetclass"]
 
 
 # standard library
@@ -42,7 +42,7 @@ def dataarrayclass(
     frozen: bool = False,
     shorthands: bool = True,
 ) -> Union[Type[DataClass], Callable[[type], Type[DataClass]]]:
-    """Class decorator to create a DataArray class."""
+    """Class decorator to create a DataArray class (deprecated in v1.0.0)."""
     from .dataarray import AsDataArray
 
     warn(
@@ -82,7 +82,7 @@ def datasetclass(
     frozen: bool = False,
     shorthands: bool = True,
 ) -> Union[Type[DataClass], Callable[[type], Type[DataClass]]]:
-    """Class decorator to create a Dataset class."""
+    """Class decorator to create a Dataset class (deprecated in v1.0.0)."""
     from .dataset import AsDataset
 
     warn(


Test patch:
diff --git a/tests/test_metadata.py b/tests/test_metadata.py
index 58602ba..040ed73 100644
--- a/tests/test_metadata.py
+++ b/tests/test_metadata.py
@@ -8,4 +8,4 @@ def test_author():
 
 
 def test_version():
-    assert xarray_dataclasses.__version__ == "0.6.1"
+    assert xarray_dataclasses.__version__ == "0.7.0"