Deprecate: deprecate methods in RecipeOrganizer pt1#168
Deprecate: deprecate methods in RecipeOrganizer pt1#168sbillinge merged 14 commits intodiffpy:v3.3.0from
RecipeOrganizer pt1#168Conversation
| from functools import partial | ||
| from itertools import chain, groupby | ||
|
|
||
| import six |
There was a problem hiding this comment.
removed deprecated six stuff
| yield par | ||
| for parameter in list(self._parameters.values()): | ||
| if regexp.search(parameter.name): | ||
| yield parameter |
There was a problem hiding this comment.
in this file, i changed every par to parameter
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v3.3.0 #168 +/- ##
==========================================
+ Coverage 77.94% 78.25% +0.31%
==========================================
Files 24 24
Lines 3622 3674 +52
==========================================
+ Hits 2823 2875 +52
Misses 799 799
🚀 New features to boost your workflow:
|
| params : dict, optional | ||
| The dictionary of Parameters, indexed by name, that are used in the | ||
| equation string but are not part of the RecipeOrganizer | ||
| (default is {}). |
There was a problem hiding this comment.
made the arg names better for constrain and restrain. I don't feel like we need to spend time deprecating the variable names. If someones code breaks because we change the variable names I feel like the user should be able to figure it out pretty quickly. TLDR, I think it would be more time than its worth.
| expected_constrained_params = [p1.name] | ||
|
|
||
| assert actual_constrained_params == expected_constrained_params | ||
|
|
There was a problem hiding this comment.
add simple test for new and deprecated functions
| eq = self.m.register_string_function("g/x - 1", "pdf") | ||
| self.assertTrue(numpy.array_equal(g(x) / x - 1, eq())) | ||
|
|
||
| return |
There was a problem hiding this comment.
Had to duplicate this test bc register calculator is only referenced once (the test below this)
| self.assertEqual(36, self.m.evaluate_equation("3 * x")) | ||
| self.assertEqual(0, len(self.m._eqfactory.equations)) | ||
| return | ||
|
|
There was a problem hiding this comment.
Another test i had to dupliucate for the same reason
|
@sbillinge Ready for review. I spent some good time tidying up docstrings and var names :) |
|
Thanks for this work, it is really appreciated. |
No description provided.