forked from malariagen/malariagen-data-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
39 lines (30 loc) · 1.07 KB
/
__init__.py
File metadata and controls
39 lines (30 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# flake8: noqa
from .adar1 import Adar1
from .adir1 import Adir1
from .af1 import Af1
from .ag3 import Ag3
from .amin1 import Amin1
from .as1 import As1
from .anopheles import AnophelesDataResource, Region
from .pf7 import Pf7
from .pf8 import Pf8
from .pf9 import Pf9
from .pv4 import Pv4
from .util import SiteClass
try:
import importlib.metadata as importlib_metadata
except ModuleNotFoundError:
import importlib_metadata # type: ignore
# this will read version from pyproject.toml
__version__ = importlib_metadata.version(__name__)
def _ensure_xarray_zarr_backend():
# workaround for https://github.com/malariagen/malariagen-data-python/issues/320
# see also https://github.com/pydata/xarray/issues/7478
from xarray.backends.plugins import list_engines
from xarray.backends.zarr import ZarrBackendEntrypoint
# zarr is a dependency, so will always be available if malariagen_data
# is installed
ZarrBackendEntrypoint.available = True
# ensure xarray refreshes list of available engines
list_engines.cache_clear()
_ensure_xarray_zarr_backend()