Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
brovelli committed Mar 25, 2021
2 parents 65774ac + 1b6ce60 commit c120626
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 30 deletions.
3 changes: 1 addition & 2 deletions frites/io/__init__.py
@@ -1,5 +1,4 @@
"""I/O conversion functions."""
from .io_attributes import Attributes # noqa
from .io_dependencies import (is_pandas_installed, is_xarray_installed, # noqa
is_numba_installed)
from .io_dependencies import (is_numba_installed) # noqa
from .io_syslog import set_log_level, logger, verbose # noqa
28 changes: 0 additions & 28 deletions frites/io/io_dependencies.py
@@ -1,34 +1,6 @@
"""Check if packages are installed."""


def is_pandas_installed(raise_error=False):
"""Test if pandas is installed."""
try:
import pandas # noqa
is_installed = True
except ImportError:
is_installed = False
# Raise error (if needed) :
if raise_error and not is_installed:
raise IOError("pandas not installed. See https://pandas.pydata.org/#"
"best-way-to-install for installation instructions.")
return is_installed


def is_xarray_installed(raise_error=False):
"""Test if xarray is installed."""
try:
import xarray # noqa
is_installed = True
except ImportError:
is_installed = False
# Raise error (if needed) :
if raise_error and not is_installed:
raise IOError("xarray not installed. See http://xarray.pydata.org"
"for installation instructions.")
return is_installed


def is_numba_installed(raise_error=False):
"""Test if numba is installed."""
try:
Expand Down

0 comments on commit c120626

Please sign in to comment.