Skip to content
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

Add true deprecation warning to pyomo command #2740

Merged
merged 5 commits into from
Feb 15, 2023

Conversation

mrmundt
Copy link
Contributor

@mrmundt mrmundt commented Feb 14, 2023

Fixes #160

Summary/Motivation:

This PR adds a true deprecation warning to the pyomo command.

Changes proposed in this PR:

  • Print deprecation warning if pyomo is called without a subcommand

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

Copy link
Contributor

@Robbybp Robbybp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This just changes how a warning is displayed, and even has a test

@codecov
Copy link

codecov bot commented Feb 15, 2023

Codecov Report

Base: 82.23% // Head: 87.01% // Increases project coverage by +4.77% 🎉

Coverage data is based on head (7ccced6) compared to base (6ef8840).
Patch coverage: 66.66% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2740      +/-   ##
==========================================
+ Coverage   82.23%   87.01%   +4.77%     
==========================================
  Files         771      771              
  Lines       86306    86307       +1     
==========================================
+ Hits        70975    75101    +4126     
+ Misses      15331    11206    -4125     
Flag Coverage Δ
linux 84.18% <66.66%> (?)
osx 73.65% <66.66%> (?)
other 84.36% <66.66%> (?)
win 81.55% <66.66%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pyomo/scripting/pyomo_main.py 72.34% <66.66%> (+7.12%) ⬆️
pyomo/util/subsystems.py 89.13% <0.00%> (-8.70%) ⬇️
...ontrib/appsi/utils/collect_vars_and_named_exprs.py 93.75% <0.00%> (-6.25%) ⬇️
pyomo/core/base/external.py 95.43% <0.00%> (-3.16%) ⬇️
pyomo/contrib/appsi/writers/nl_writer.py 84.39% <0.00%> (-2.32%) ⬇️
pyomo/core/expr/compare.py 96.52% <0.00%> (-1.74%) ⬇️
pyomo/repn/plugins/ampl/ampl_.py 81.40% <0.00%> (-1.47%) ⬇️
pyomo/contrib/appsi/base.py 84.94% <0.00%> (-0.26%) ⬇️
pyomo/repn/plugins/nl_writer.py 93.60% <0.00%> (-0.16%) ⬇️
pyomo/contrib/appsi/solvers/ipopt.py 88.51% <0.00%> (ø)
... and 108 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@blnicho blnicho merged commit fb7a7b2 into Pyomo:main Feb 15, 2023
@mrmundt mrmundt deleted the deprecate-command branch March 30, 2023 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecate the old 'pyomo' command syntax
4 participants