Skip to content

Commit

Permalink
Merge pull request #164 from alisnwu/resampler-relocation
Browse files Browse the repository at this point in the history
Move resampler out of parsers, remove relative paths for import
  • Loading branch information
sbillinge authored Nov 9, 2024
2 parents e9a7b2d + ccecf10 commit 2559946
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 11 deletions.
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

0 comments on commit 2559946

Please sign in to comment.