Skip to content

Commit 37add18

Browse files
TomNicholasJoseph Hamman
and
Joseph Hamman
authored
* black reformatting * add setup.cfg to configure flake8/black/isort/mypy * add setup.cfg to configure flake8/black/isort/mypy xarray-contrib/datatree#22 * passes flake8 * disabled mypy for now Co-authored-by: Joseph Hamman <[email protected]>
1 parent 495f539 commit 37add18

12 files changed

+443
-248
lines changed

.pre-commit-config.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,22 @@ repos:
2929
# hooks:
3030
# - id: velin
3131
# args: ["--write", "--compact"]
32-
- repo: https://github.com/pre-commit/mirrors-mypy
33-
rev: v0.910
34-
hooks:
35-
- id: mypy
36-
# Copied from setup.cfg
37-
exclude: "properties|asv_bench"
38-
additional_dependencies: [
39-
# Type stubs
40-
types-python-dateutil,
41-
types-pkg_resources,
42-
types-PyYAML,
43-
types-pytz,
44-
# Dependencies that are typed
45-
numpy,
46-
typing-extensions==3.10.0.0,
47-
]
32+
# - repo: https://github.com/pre-commit/mirrors-mypy
33+
# rev: v0.910
34+
# hooks:
35+
# - id: mypy
36+
# # Copied from setup.cfg
37+
# exclude: "properties|asv_bench"
38+
# additional_dependencies: [
39+
# # Type stubs
40+
# types-python-dateutil,
41+
# types-pkg_resources,
42+
# types-PyYAML,
43+
# types-pytz,
44+
# # Dependencies that are typed
45+
# numpy,
46+
# typing-extensions==3.10.0.0,
47+
# ]
4848
# run this occasionally, ref discussion https://github.com/pydata/xarray/pull/3194
4949
# - repo: https://github.com/asottile/pyupgrade
5050
# rev: v1.22.1

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This aims to create the data structure discussed in [xarray issue #4118](https:/
55

66

77
The approach used here is based on benbovy's [`DatasetNode` example](https://gist.github.com/benbovy/92e7c76220af1aaa4b3a0b65374e233a) - the basic idea is that each tree node wraps a up to a single `xarray.Dataset`. The differences are that this effort:
8-
- [Uses a NodeMixin from anytree](https://github.com/TomNicholas/datatree/issues/7) for the tree structure,
8+
- [Uses a NodeMixin from anytree](https://github.com/TomNicholas/datatree/issues/7) for the tree structure,
99
- Implements path-like and tag-like getting and setting,
1010
- Has functions for mapping user-supplied functions over every node in the tree,
1111
- Automatically dispatches *some* of `xarray.Dataset`'s API over every node in the tree (such as `.isel`),

datatree/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
from .datatree import DataTree, map_over_subtree, DataNode
1+
# flake8: noqa
2+
# Ignoring F401: imported but unused
3+
from .datatree import DataNode, DataTree, map_over_subtree
24
from .io import open_datatree

datatree/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.1.dev46+g415cbb7.d20210825"
1+
__version__ = "0.1.dev46+g415cbb7.d20210825"

0 commit comments

Comments
 (0)