Skip to content

Move resampler out of parsers, remove relative paths for import #164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions news/resampler-relocation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* Moved resampler out of parsers, new path is diffpy.utils.resampler

**Deprecated:**

* <news item>

**Removed:**

* Relative imports in parser's __init__.py

**Fixed:**

* <news item>

**Security:**

* <news item>
8 changes: 0 additions & 8 deletions src/diffpy/utils/parsers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/test_loaddata.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import numpy
import pytest

from diffpy.utils.parsers import loadData
from diffpy.utils.parsers.loaddata import loadData


##############################################################################
Expand Down
2 changes: 1 addition & 1 deletion tests/test_resample.py
Original file line number Diff line number Diff line change
@@ -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():
Expand Down
3 changes: 2 additions & 1 deletion tests/test_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")))

Expand Down
Loading