Skip to content

Commit

Permalink
Fixing the unit tests (and maybe the docs?)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryan-harter committed Feb 17, 2022
1 parent dda363d commit dac4989
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions cdflib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
from . import cdfread, cdfwrite
from .epochs import CDFepoch as cdfepoch # noqa: F401

try:
from .epochs_astropy import CDFAstropy as cdfastropy

except Exception:
pass

from .cdf_to_xarray import cdf_to_xarray
from .xarray_to_cdf import xarray_to_cdf
from pathlib import Path

# This function determines if we are reading or writing a file
Expand All @@ -25,3 +17,10 @@ def CDF(path, cdf_spec=None, delete=False, validate=None, string_encoding='ascii
return cdfread.CDF(path, validate=validate, string_encoding=string_encoding)
else:
return cdfwrite.CDF(path, cdf_spec=cdf_spec, delete=delete)

try:
from .epochs_astropy import CDFAstropy as cdfastropy
from .cdf_to_xarray import cdf_to_xarray
from .xarray_to_cdf import xarray_to_cdf
except Exception:
pass

0 comments on commit dac4989

Please sign in to comment.