Skip to content

Commit

Permalink
Add __version__ (#208)
Browse files Browse the repository at this point in the history
Co-authored-by: Anderson Banihirwe <axbanihirwe@ualr.edu>
  • Loading branch information
dcherian and andersy005 authored Apr 20, 2021
1 parent be8b23e commit fb352cf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions cf_xarray/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
from pkg_resources import DistributionNotFound, get_distribution

from .accessor import CFAccessor # noqa
from .helpers import bounds_to_vertices, vertices_to_bounds # noqa

try:
__version__ = get_distribution("cf_xarray").version
except DistributionNotFound:
# package is not installed
__version__ = 'unknown'
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ skip_gitignore = true
force_to_top = true
default_section = THIRDPARTY
known_first_party = cf_xarray
known_third_party = dask,matplotlib,numpy,pandas,pytest,setuptools,sphinx_autosummary_accessors,xarray
known_third_party = dask,matplotlib,numpy,pandas,pkg_resources,pytest,setuptools,sphinx_autosummary_accessors,xarray

# Most of the numerical computing stack doesn't have type annotations yet.
[mypy-affine.*]
Expand Down

0 comments on commit fb352cf

Please sign in to comment.