Skip to content

Commit

Permalink
Remove deprecated sunpy.io.cdf
Browse files Browse the repository at this point in the history
  • Loading branch information
dstansby committed Oct 17, 2023
1 parent 06a2a30 commit dffec01
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 22 deletions.
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
warnings.filterwarnings("error", category=SunpyPendingDeprecationWarning)
warnings.filterwarnings("error", category=MatplotlibDeprecationWarning)
warnings.filterwarnings("error", category=AstropyDeprecationWarning)
warnings.filterwarnings("ignore", message="The `sunpy.io.cdf` module is deprecated",category=SunpyDeprecationWarning)
warnings.filterwarnings("ignore", message="The `sunpy.io.jp2` module is deprecated",category=SunpyDeprecationWarning)
warnings.filterwarnings("ignore", message="The `sunpy.io.file_tools` module is deprecated",category=SunpyDeprecationWarning)

Expand Down
5 changes: 0 additions & 5 deletions sunpy/io/_cdf.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
"""
This module provides a CDF file reader for internal use.
.. warning::
``sunpy.io.cdf`` is deprecated, and will be removed in sunpy 5.1. This is
because it was designed for internal use only.
"""
import cdflib
import numpy as np
Expand Down
9 changes: 0 additions & 9 deletions sunpy/io/cdf.py

This file was deleted.

6 changes: 0 additions & 6 deletions sunpy/io/tests/test_cdf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import importlib

import numpy as np

Expand All @@ -24,8 +23,3 @@ def test_read_cdf():
assert col.unit == u.Unit("1 / (cm2 MeV s sr)")
# Check that fillvals are replaced by NaN
assert np.sum(np.isnan(col)) == 189


def test_old_import():
lib = importlib.import_module("sunpy.io.cdf")
assert lib.read_cdf is read_cdf
2 changes: 1 addition & 1 deletion sunpy/timeseries/tests/test_timeseries_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def test_read_cdf_empty_variable():
a.cdaweb.Dataset('AC_H6_SWI'))
filename = Fido.fetch(result[0, 0])

# Temporarily reset sunpy.io.cdf registry of known unit conversions
# Temporarily reset sunpy.io._cdf registry of known unit conversions
import sunpy.io._cdf as sunpy_cdf
known_units = sunpy_cdf._known_units
sunpy_cdf._known_units = {}
Expand Down

0 comments on commit dffec01

Please sign in to comment.