diff --git a/news/resampler-relocation.rst b/news/resampler-relocation.rst new file mode 100644 index 00000000..220fc2f5 --- /dev/null +++ b/news/resampler-relocation.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* Moved resampler out of parsers, new path is diffpy.utils.resampler + +**Deprecated:** + +* + +**Removed:** + +* Relative imports in parser's __init__.py + +**Fixed:** + +* + +**Security:** + +* diff --git a/src/diffpy/utils/parsers/__init__.py b/src/diffpy/utils/parsers/__init__.py index a2104181..cd95dd63 100644 --- a/src/diffpy/utils/parsers/__init__.py +++ b/src/diffpy/utils/parsers/__init__.py @@ -16,12 +16,4 @@ """Various utilities related to data parsing and manipulation. """ -from .loaddata import loadData -from .resample import resample -from .serialization import deserialize_data, serialize_data - -# silence the pyflakes syntax checker -assert loadData or resample or True -assert serialize_data or deserialize_data or True - # End of file diff --git a/src/diffpy/utils/parsers/resample.py b/src/diffpy/utils/resampler.py similarity index 100% rename from src/diffpy/utils/parsers/resample.py rename to src/diffpy/utils/resampler.py diff --git a/tests/test_loaddata.py b/tests/test_loaddata.py index 2ca2fa07..3d775c74 100644 --- a/tests/test_loaddata.py +++ b/tests/test_loaddata.py @@ -8,7 +8,7 @@ import numpy import pytest -from diffpy.utils.parsers import loadData +from diffpy.utils.parsers.loaddata import loadData ############################################################################## diff --git a/tests/test_resample.py b/tests/test_resample.py index fa9c7e70..deddcca2 100644 --- a/tests/test_resample.py +++ b/tests/test_resample.py @@ -1,7 +1,7 @@ import numpy as np import pytest -from diffpy.utils.parsers.resample import wsinterp +from diffpy.utils.resampler import wsinterp def test_wsinterp(): diff --git a/tests/test_serialization.py b/tests/test_serialization.py index 51921e01..fc3696bf 100644 --- a/tests/test_serialization.py +++ b/tests/test_serialization.py @@ -3,8 +3,9 @@ import numpy import pytest -from diffpy.utils.parsers import deserialize_data, loadData, serialize_data from diffpy.utils.parsers.custom_exceptions import ImproperSizeError, UnsupportedTypeError +from diffpy.utils.parsers.loaddata import loadData +from diffpy.utils.parsers.serialization import deserialize_data, serialize_data tests_dir = os.path.dirname(os.path.abspath(locals().get("__file__", "file.py")))