Repository: arviz-devs/arviz

Issue:
Remove load_data and save_data functions before 0.4
`load_data` and `save_data` are currently deprecated (after 0.3.1 release). They need to be removed after 0.4 (assuming next release is going to be 0.3.2).


Discussion:

Resolving patch:
diff --git a/arviz/data/__init__.py b/arviz/data/__init__.py
--- a/arviz/data/__init__.py
+++ b/arviz/data/__init__.py
@@ -1,6 +1,6 @@
 """Code for loading and manipulating data structures."""
 from .inference_data import InferenceData, concat
-from .io_netcdf import from_netcdf, to_netcdf, load_data, save_data
+from .io_netcdf import from_netcdf, to_netcdf
 from .datasets import load_arviz_data, list_datasets, clear_data_home
 from .base import numpy_to_data_array, dict_to_dataset
 from .converters import convert_to_dataset, convert_to_inference_data
@@ -31,6 +31,4 @@
     "from_tfp",
     "from_netcdf",
     "to_netcdf",
-    "load_data",
-    "save_data",
 ]
diff --git a/arviz/data/io_netcdf.py b/arviz/data/io_netcdf.py
--- a/arviz/data/io_netcdf.py
+++ b/arviz/data/io_netcdf.py
@@ -1,5 +1,5 @@
 """Input and output support for data."""
-import warnings
+
 from .inference_data import InferenceData
 from .converters import convert_to_inference_data
 
@@ -41,58 +41,3 @@ def to_netcdf(data, filename, *, group="posterior", coords=None, dims=None):
     inference_data = convert_to_inference_data(data, group=group, coords=coords, dims=dims)
     file_name = inference_data.to_netcdf(filename)
     return file_name
-
-
-def load_data(filename):
-    """Load netcdf file back into an arviz.InferenceData.
-
-    Parameters
-    ----------
-    filename : str
-        name or path of the file to load trace
-
-    Note
-    ----
-    This function is deprecated and will be removed in 0.4.
-    Use `from_netcdf` instead.
-    """
-    warnings.warn(
-        "The 'load_data' function is deprecated as of 0.3.2, use 'from_netcdf' instead",
-        DeprecationWarning,
-    )
-    return from_netcdf(filename=filename)
-
-
-def save_data(data, filename, *, group="posterior", coords=None, dims=None):
-    """Save dataset as a netcdf file.
-
-    WARNING: Only idempotent in case `data` is InferenceData
-
-    Parameters
-    ----------
-    data : InferenceData, or any object accepted by `convert_to_inference_data`
-        Object to be saved
-    filename : str
-        name or path of the file to load trace
-    group : str (optional)
-        In case `data` is not InferenceData, this is the group it will be saved to
-    coords : dict (optional)
-        See `convert_to_inference_data`
-    dims : dict (optional)
-        See `convert_to_inference_data`
-
-    Returns
-    -------
-    str
-        filename saved to
-
-    Note
-    ----
-    This function is deprecated and will be removed in 0.4.
-    Use `to_netcdf` instead.
-    """
-    warnings.warn(
-        "The 'save_data' function is deprecated as of 0.3.2, use 'to_netcdf' instead",
-        DeprecationWarning,
-    )
-    return to_netcdf(data=data, filename=filename, group=group, coords=coords, dims=dims)


Test patch:
diff --git a/arviz/tests/test_data.py b/arviz/tests/test_data.py
--- a/arviz/tests/test_data.py
+++ b/arviz/tests/test_data.py
@@ -22,8 +22,6 @@
     from_netcdf,
     from_tfp,
     to_netcdf,
-    load_data,
-    save_data,
     load_arviz_data,
     list_datasets,
     clear_data_home,
@@ -664,14 +662,6 @@ def test_io_function(self, data, eight_schools_params):
         assert hasattr(inference_data2, "posterior")
         os.remove(filepath)
         assert not os.path.exists(filepath)
-        # Test deprecated functions
-        save_data(inference_data, filepath)
-        assert os.path.exists(filepath)
-        assert os.path.getsize(filepath) > 0
-        inference_data3 = load_data(filepath)
-        assert hasattr(inference_data3, "posterior")
-        os.remove(filepath)
-        assert not os.path.exists(filepath)
 
     def test_io_method(self, data, eight_schools_params):
         inference_data = self.get_inference_data(  # pylint: disable=W0612