Skip to content

Commit

Permalink
ref: deprecate IndentationPreprocessor (close #17)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Aug 16, 2021
1 parent 3b763ec commit 62ffdda
Show file tree
Hide file tree
Showing 7 changed files with 325 additions and 307 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
3.1.3
- ref: deprecate `IndentationPreprocessor` class in favor of a more
flat submodule (#17)
3.1.2
- docs: add POC table to docs
3.1.1
Expand Down
2 changes: 1 addition & 1 deletion nanite/cli/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def setup_profile():
pf = Profile()

print("\nDefine preprocessing:")
steps = preproc.available_preprocessors
steps = [pp.identifier for pp in preproc.PREPROCESSORS]
cur = pf["preprocessing"]
curid = ",".join([str(steps.index(cc) + 1) for cc in cur])
for ii, st in enumerate(steps):
Expand Down
1 change: 1 addition & 0 deletions nanite/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class FitProperties(dict):
Additional attributes:
"""

def __setitem__(self, key, value):
if key == "segment":
# Since version 1.8.0, nanite uses an integer to identify
Expand Down
14 changes: 7 additions & 7 deletions nanite/indent.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
FP_DEFAULT
from . import model
from . import poc
from .preproc import IndentationPreprocessor
from . import preproc
from .rate import get_rater


Expand Down Expand Up @@ -53,8 +53,8 @@ def apply_preprocessing(self, preprocessing=None, options=None,
Parameters
----------
preprocessing: list
A list of preprocessing method names that are
stored in the `IndentationPreprocessor` class.
A list of preprocessing method identifiers that are
stored in the `nanite.preproc.PREPROCESSORS` list.
If set to `None`, `self.preprocessing` will be
used.
options: dict of dict
Expand Down Expand Up @@ -89,10 +89,10 @@ def apply_preprocessing(self, preprocessing=None, options=None,
self._rating = None
# Apply preprocessing
# (This will call `AFMData.reset_data` on self)
details = IndentationPreprocessor.apply(apret=self,
identifiers=preprocessing,
options=options,
ret_details=ret_details)
details = preproc.apply(apret=self,
identifiers=preprocessing,
options=options,
ret_details=ret_details)
self._preprocessing_details = details
# Check availability of axes
for ax in ["x_axis", "y_axis"]:
Expand Down

0 comments on commit 62ffdda

Please sign in to comment.