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

PEP: Standardize Example Imports #3543

Merged
merged 27 commits into from
Apr 4, 2025
Merged

Conversation

mrmundt
Copy link
Contributor

@mrmundt mrmundt commented Mar 27, 2025

Fixes #1026

Summary/Motivation:

As promised, I was frustrated with something solver-refactor related yesterday, so I took break to resolve this PEP. This standardizes all files in the examples directory to use the same import standard (import pyomo.environ as pyo).

Changes proposed in this PR:

  • Standardize imports to import pyomo.environ as pyo
  • Fix other import * statements as appropriate

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.

@mrmundt mrmundt marked this pull request as draft March 27, 2025 15:17
@mrmundt mrmundt marked this pull request as ready for review March 27, 2025 22:13
Copy link
Member

@blnicho blnicho left a comment

Choose a reason for hiding this comment

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

I found lots of places where pyo. was added by mistake.

@blnicho blnicho mentioned this pull request Apr 1, 2025
@mrmundt mrmundt requested a review from jsiirola April 3, 2025 14:40
@mrmundt mrmundt requested review from blnicho and jsiirola April 3, 2025 14:59
@blnicho blnicho merged commit 166119a into Pyomo:main Apr 4, 2025
35 checks passed
@mrmundt mrmundt deleted the example-imports branch April 9, 2025 14:06
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.

[PEP] Standardizing Pyomo Imports in examples as "import pyomo.environ as pyo"
3 participants