-
Notifications
You must be signed in to change notification settings - Fork 23
deprecate: deprecate the rest of the methods in recipeorganizer.py
#169
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
Changes from 7 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
3b9b257
constrain and unconstrain deprecation
cadenmyers13 9993779
change name to register_restraint
cadenmyers13 1f301a3
restrain deprecation
cadenmyers13 8184be4
unrestrain deprecation
cadenmyers13 5d958fb
clearRestraints deprecation
cadenmyers13 7a2e29d
equationFromString deprecation
cadenmyers13 a5fb23c
news
cadenmyers13 a79dbec
constrain_parameter --> add_constraint
cadenmyers13 80173b6
unconstrain_parameter --> remove_constraint
cadenmyers13 31a57fc
add_restraint --> add_penalty
cadenmyers13 f04475c
remove_restraint --> remove_penalty
cadenmyers13 a197c76
register_restraint --> register_penalty
cadenmyers13 d77c6ac
clear_all_restraints --> clear_all_penalties
cadenmyers13 0b9e9f7
change lb to lower_bound everywhere
cadenmyers13 273e63a
change ub to upper_bound everywhere
cadenmyers13 7032d6b
add_penalty --> add_soft_bounds
cadenmyers13 dab361f
remove_penalty --> remove_soft_bounds
cadenmyers13 e67595d
register_penalty --> register_soft_bounds
cadenmyers13 680fee4
clear_all_penalties --> clear_all_soft_bounds
cadenmyers13 8c3618c
add more to add_soft_bounds docstring
cadenmyers13 c115478
more to docstring
cadenmyers13 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| **Added:** | ||
|
|
||
| * Added ``constrain_parameter`` method to ``RecipeOrganizer``. | ||
| * Added ``unconstrain_parameter`` method to ``RecipeOrganizer``. | ||
| * Added ``add_restraint`` method to ``RecipeOrganizer``. | ||
| * Added ``remove_restraint`` method to ``RecipeOrganizer``. | ||
| * Added ``register_restraint`` method to ``RecipeOrganizer``. | ||
| * Added ``clear_all_restraints`` method to ``RecipeOrganizer``. | ||
| * Added ``get_equation_from_string`` method to ``RecipeOrganizer``. | ||
|
|
||
| **Changed:** | ||
|
|
||
| * <news item> | ||
|
|
||
| **Deprecated:** | ||
|
|
||
| * Deprecated ``constrain`` method of ``RecipeOrganizer``. Use ``constrain_parameter`` instead. | ||
| * Deprecated ``unconstrain`` method of ``RecipeOrganizer``. Use ``unconstrain_parameter`` instead. | ||
| * Deprecated ``restrain`` method of ``RecipeOrganizer``. Use ``add_restraint`` instead. | ||
| * Deprecated ``unrestrain`` methods of ``RecipeOrganizer``. Use ``remove_restraint`` instead. | ||
| * Deprecated ``addRestraint`` method of ``RecipeOrganizer``. Use ``register_restraint`` instead. | ||
| * Deprecate ``clearRestraints`` method of ``RecipeOrganizer``. Use ``clear_all_restraints`` instead. | ||
| * Deprecated ``equationFromString`` method of ``RecipeOrganizer``. Use ``get_equation_from_string`` instead. | ||
|
|
||
| **Removed:** | ||
|
|
||
| * <news item> | ||
|
|
||
| **Fixed:** | ||
|
|
||
| * <news item> | ||
|
|
||
| **Security:** | ||
|
|
||
| * <news item> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I like
add_restraintbetter thanconstrain_parameter. It is not completely clear to me whether we are constraining parameters or variables or what is happening. Actually, I think that the constraint maps parameters to variables somehow. In that case, to avoid awkwardness, does it make sense to call itadd_constraint. I am open to discussion on this, but I since we are deprecating everything, it is really our opportunity to think about this and get it right this time....Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sbillinge Yeah lets go with
add_. I think the wordsconstrainandrestraincan also get mixed up in the heads of users (and mine lol). What if we did change,constrain-->add_constraintrestrain-->add_penaltyoradd_boundsoradd_soft_boundswhat do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We actually have a
Restraintclass that manages all the restraints as well as_restraintsattributes, so this could get confusing if we change... I still am not much of a fan of how similar those two words areThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a
Restraint.penaltymethod though that calculates the penalty, soadd_penaltymight be okayThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go with
add_penalty, I like that.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sbillinge okay i made the change, see the commit messages and the news items for whats changed