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

Apply black to dae and network directory py files #2783

Merged
merged 2 commits into from
Apr 7, 2023

Conversation

mrmundt
Copy link
Contributor

@mrmundt mrmundt commented Mar 21, 2023

Fixes (Partly) #329

Summary/Motivation:

This is the first in a relatively long string of PRs to apply PEP8 standards via black to Pyomo. We are following the standard used by IDAES except that we are adding the -S option: Don't normalize string quotes or prefixes and the -C option: Don't use trailing commas as a reason to split lines.

NOTE: All changes are NFC.

Full command used: black -S -C pyomo/dae && black -S -C pyomo/network

⚠️ Please squash this at merge. ⚠️

Changes proposed in this PR:

  • Apply black to the dae and network directory py files
  • Manually fix instances where two lines were merged and left " " or ' '

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.

@codecov
Copy link

codecov bot commented Mar 22, 2023

Codecov Report

Patch coverage: 84.85% and project coverage change: -0.48 ⚠️

Comparison is base (b6af7b0) 87.01% compared to head (220e4a3) 86.53%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2783      +/-   ##
==========================================
- Coverage   87.01%   86.53%   -0.48%     
==========================================
  Files         763      763              
  Lines       87123   108277   +21154     
==========================================
+ Hits        75807    93701   +17894     
- Misses      11316    14576    +3260     
Flag Coverage Δ
linux 84.03% <84.85%> (+0.01%) ⬆️
osx 73.52% <84.50%> (+0.01%) ⬆️
other 84.21% <84.85%> (+0.01%) ⬆️
win 81.54% <84.50%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
pyomo/dae/plugins/__init__.py 100.00% <ø> (ø)
pyomo/dae/utilities.py 100.00% <ø> (ø)
pyomo/network/plugins/__init__.py 100.00% <ø> (ø)
pyomo/network/util.py 95.34% <ø> (ø)
pyomo/network/arc.py 83.17% <50.00%> (ø)
pyomo/dae/simulator.py 90.86% <69.38%> (ø)
pyomo/network/decomposition.py 91.04% <72.22%> (ø)
pyomo/dae/set_utils.py 90.16% <77.77%> (ø)
pyomo/dae/initialization.py 90.90% <85.71%> (ø)
pyomo/network/foqus_graph.py 90.30% <86.11%> (ø)
... and 9 more

... and 358 files with indirect coverage changes

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 in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mrmundt mrmundt requested a review from blnicho March 22, 2023 21:45
@mrmundt
Copy link
Contributor Author

mrmundt commented Mar 22, 2023

⚠️ Please squash this at merge. ⚠️

@mrmundt mrmundt mentioned this pull request Apr 6, 2023
Copy link
Member

@jsiirola jsiirola left a comment

Choose a reason for hiding this comment

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

Everything looks OK. I found (and fixed) a couple mangled comments.

@mrmundt mrmundt merged commit 0d93f98 into Pyomo:main Apr 7, 2023
@mrmundt mrmundt deleted the black/dae branch July 25, 2023 17:36
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.

4 participants