Skip to content
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/fix-typo.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* Fix the misspelled method name ``RecipeOrganizer.get_constrained_parmeters``, added in 3.4.0. It is now ``RecipeOrganizer.get_constrained_parameters``, and ``getConstrainedPars`` points to the corrected name.

**Security:**

* <news item>
8 changes: 4 additions & 4 deletions src/diffpy/srfit/fitbase/recipeorganizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
getConstrainedPars_deprecation_msg = build_deprecation_message(
recipeorganizer_base,
"getConstrainedPars",
"get_constrained_parmeters",
"get_constrained_parameters",
removal_version,
)

Expand Down Expand Up @@ -1313,7 +1313,7 @@ def unconstrain(self, *pars):
self.remove_constraint(*pars)
return

def get_constrained_parmeters(self, recurse=False):
def get_constrained_parameters(self, recurse=False):
"""Get the constrained managed Parameters in this object.

Parameters
Expand All @@ -1338,10 +1338,10 @@ def getConstrainedPars(self, recurse=False):
version 4.0.0.

Please use
diffpy.srfit.fitbase.recipeorganizer.RecipeOrganizer.get_constrained_parmeters
diffpy.srfit.fitbase.recipeorganizer.RecipeOrganizer.get_constrained_parameters
instead.
"""
return self.get_constrained_parmeters(recurse=recurse)
return self.get_constrained_parameters(recurse=recurse)

def clear_all_constraints(self, recurse=False):
"""Clear all constraints managed by this organizer.
Expand Down
4 changes: 2 additions & 2 deletions tests/deprecated/test_recipeorganizer_deprecations.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ def _call_organizer_method(organizer, method_name, args):
("unconstrain", "remove_constraint", ("y",)),
# C7: getConstrainedPars gets the constrained Parameters.
# Expected: Warns and gives the same result as
# get_constrained_parmeters.
("getConstrainedPars", "get_constrained_parmeters", ()),
# get_constrained_parameters.
("getConstrainedPars", "get_constrained_parameters", ()),
# C8: clearConstraints removes all constraints.
# Expected: Warns and gives the same result as
# clear_all_constraints.
Expand Down
2 changes: 1 addition & 1 deletion tests/test_recipeorganizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ def _get_constraint_state(organizer, parameter):
organizer.is_constrained(parameter),
[
constrained.name
for constrained in organizer.get_constrained_parmeters()
for constrained in organizer.get_constrained_parameters()
],
len(organizer._constraints),
)
Expand Down
Loading