This repository was archived by the owner on Oct 24, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 8 files changed +68
-57
lines changed
Expand file tree Collapse file tree 8 files changed +68
-57
lines changed Original file line number Diff line number Diff line change 1- # flake8: noqa
2- # Ignoring F401: imported but unused
3-
4- from pkg_resources import DistributionNotFound , get_distribution
5-
61# import public API
72from .datatree import DataTree
83from .io import open_datatree
94from .mapping import TreeIsomorphismError , map_over_subtree
105
116try :
12- __version__ = get_distribution (__name__ ).version
13- except DistributionNotFound : # noqa: F401; pragma: no cover
14- # package is not installed
15- pass
7+ # NOTE: the `_version.py` file must not be present in the git repository
8+ # as it is generated by setuptools at install time
9+ from ._version import __version__
10+ except ImportError : # pragma: no cover
11+ # Local copy or not installed with setuptools
12+ __version__ = "999"
13+
14+ __all__ = (
15+ "DataTree" ,
16+ "open_datatree" ,
17+ "TreeIsomorphismError" ,
18+ "map_over_subtree" ,
19+ "__version__" ,
20+ )
Original file line number Diff line number Diff line change 1+ import datatree
2+
3+
4+ def test_version ():
5+ assert datatree .__version__ != "999"
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 7878# built documents.
7979#
8080# The short X.Y version.
81- version = "0.0.1" # datatree.__version__
81+ version = datatree .__version__
8282# The full version, including alpha/beta/rc tags.
83- release = "0.0.1" # datatree.__version__
83+ release = datatree .__version__
8484
8585# The language for content autogenerated by Sphinx. Refer to documentation
8686# for a list of supported languages.
Original file line number Diff line number Diff line change 1+ [build-system ]
2+ requires = [
3+ " setuptools>=42" ,
4+ " wheel" ,
5+ " setuptools_scm[toml]>=3.4" ,
6+ " setuptools_scm_git_archive" ,
7+ ]
8+
9+ [tool .setuptools_scm ]
10+ write_to = " datatree/_version.py"
11+ write_to_template = '''
12+ # Do not change! Do not track in version control!
13+ __version__ = "{version}"
14+ '''
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ [metadata]
2+ name = xarray-datatree
3+ description = Hierarchical tree-like data structures for xarray
4+ long_description_content_type =text/markdown
5+ long_description = file: README.md
6+ url = https://github.com/xarray-contrib/datatree
7+ author = Thomas Nicholas
8+ 9+ license = Apache
10+ classifiers =
11+ Development Status :: 3 - Alpha
12+ Intended Audience :: Science/Research
13+ Topic :: Scientific/Engineering
14+ License :: OSI Approved :: Apache Software License
15+ Operating System :: OS Independent
16+ Programming Language :: Python
17+ Programming Language :: Python :: 3.8
18+ Programming Language :: Python :: 3.9
19+ Programming Language :: Python :: 3.10
20+
21+ [options]
22+ packages = find:
23+ python_requires = >=3.8
24+ install_requires =
25+ xarray >=2022.05.0.dev0
26+
27+ [options.packages.find]
28+ exclude =
29+ docs
30+ tests
31+ tests.*
32+ docs.*
33+
134[flake8]
235ignore =
336 E203 # whitespace before ':' - doesn't work well with black
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments