Skip to content

Only print modified options when switching ap - #116

Merged
ewu63 merged 2 commits into
masterfrom
fix-print-modified-options
Feb 5, 2021
Merged

ewu63 merged 2 commits into
masterfrom
fix-print-modified-options

Conversation

@ewu63

@ewu63 ewu63 commented Feb 4, 2021

Copy link
Copy Markdown
Collaborator

Purpose

Previously, the modified options were printed on every __call__, which is excessive. Now, they are printed only when switching aero problems, since it's possible for a solver to use different options based on aero problems.

Type of change

What types of change is it?
Select the appropriate type(s) that describe this PR

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (non-backwards-compatible fix or feature)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Documentation update
  • Maintenance update
  • Other (please describe)

Testing

This works locally.

Checklist

Put an x in the boxes that apply.

  • I have run flake8 and black to make sure the code adheres to PEP-8 and is consistently formatted
  • I have run unit and regression tests which pass locally with my changes
  • I have added new tests that prove my fix is effective or that my feature works
  • I have added necessary documentation

@ewu63
ewu63 requested a review from a team as a code owner February 4, 2021 18:18
@ewu63
ewu63 requested review from anilyil, joanibal and sseraj February 4, 2021 18:18
sseraj
sseraj previously approved these changes Feb 5, 2021
Comment thread adflow/pyADflow.py Resolved

@anilyil anilyil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can you check and make sure the "switching to aero problem" print is not done on all procs. we just want the root doing it.

@ewu63

ewu63 commented Feb 5, 2021

Copy link
Copy Markdown
Collaborator Author

I will fix the pprint import. Is the rest of the PR okay? I didn't change the rest of root print to use self.pp so maybe for consistency we want to revert back to the old code?

@marcomangano

Copy link
Copy Markdown
Collaborator

I didn't change the rest of root print to use self.pp so maybe for consistency we want to revert back to the old code?

We can update them when we reformat the python scripts imho

@anilyil
anilyil self-requested a review February 5, 2021 16:20

@sseraj sseraj left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I agree with @marcomangano. I think this is fine as is.

@ewu63
ewu63 merged commit c9d0d4b into master Feb 5, 2021
@ewu63
ewu63 deleted the fix-print-modified-options branch February 5, 2021 16:51
@sseraj sseraj mentioned this pull request May 6, 2021
3 of 12 tasks
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