From 1e9284e972471cfd0f0012f32e428ed709eaac8e Mon Sep 17 00:00:00 2001 From: Alison Wu Date: Wed, 6 Nov 2024 17:55:23 -0500 Subject: [PATCH 1/2] moved resample out of parsers --- news/resample-relocation.rst | 23 ++++++++++++++++++++++ src/diffpy/utils/parsers/__init__.py | 3 +-- src/diffpy/utils/{parsers => }/resample.py | 0 tests/test_resample.py | 2 +- 4 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 news/resample-relocation.rst rename src/diffpy/utils/{parsers => }/resample.py (100%) diff --git a/news/resample-relocation.rst b/news/resample-relocation.rst new file mode 100644 index 00000000..f8ffaf7f --- /dev/null +++ b/news/resample-relocation.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* Moved resampler out of parsers, new path is diffpy.utils.resample + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* diff --git a/src/diffpy/utils/parsers/__init__.py b/src/diffpy/utils/parsers/__init__.py index a2104181..2f9b65a4 100644 --- a/src/diffpy/utils/parsers/__init__.py +++ b/src/diffpy/utils/parsers/__init__.py @@ -17,11 +17,10 @@ """ 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 loadData 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/resample.py similarity index 100% rename from src/diffpy/utils/parsers/resample.py rename to src/diffpy/utils/resample.py diff --git a/tests/test_resample.py b/tests/test_resample.py index fa9c7e70..cdaee0ae 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.resample import wsinterp def test_wsinterp(): From 1783da9844d2443ec19a6d3139ceaec328d5b0ce Mon Sep 17 00:00:00 2001 From: Alison Wu Date: Wed, 6 Nov 2024 18:24:08 -0500 Subject: [PATCH 2/2] edited parser __init__.py to cookiecutting standard --- src/diffpy/utils/parsers/__init__.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/diffpy/utils/parsers/__init__.py b/src/diffpy/utils/parsers/__init__.py index 2f9b65a4..cd95dd63 100644 --- a/src/diffpy/utils/parsers/__init__.py +++ b/src/diffpy/utils/parsers/__init__.py @@ -16,11 +16,4 @@ """Various utilities related to data parsing and manipulation. """ -from .loaddata import loadData -from .serialization import deserialize_data, serialize_data - -# silence the pyflakes syntax checker -assert loadData or True -assert serialize_data or deserialize_data or True - # End of file