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

Totals dictionary with OpenMDAO >=3.31 has promoted names as keys #426

Merged
merged 4 commits into from
Apr 16, 2024

Conversation

eytanadler
Copy link
Collaborator

@eytanadler eytanadler commented Apr 15, 2024

Purpose

As of OpenMDAO 3.31, the dictionary of total derivatives returned by compute_totals uses user-facing (promoted) variable names as the keys. This broke a test that was using absolute names for the keys. I added a try/except block to try using the absolute names and if that throws a KeyError use the promoted names instead.

The fixes the test that failed a couple weeks ago.

Expected time until merged

A few days

Type of change

  • 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

Run the tests in test_multipoint_parallel.py with OpenMDAO 3.30 and 3.31 with and without my changes.

Checklist

  • I have run flake8 and black to make sure the Python code adheres to PEP-8 and is consistently formatted
  • I have formatted the Fortran code with fprettify or C/C++ code with clang-format as applicable
  • 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

@eytanadler eytanadler requested a review from a team as a code owner April 15, 2024 15:24
@eytanadler eytanadler requested review from lamkina, kanekosh and sabakhshi and removed request for lamkina April 15, 2024 15:24
@eytanadler
Copy link
Collaborator Author

I don't know what is going on with codecov (I've seen it before and others have too). We might just need to wait and rerun tests, but the actual OAS tests are passing so this is ready to review.

kanekosh
kanekosh previously approved these changes Apr 16, 2024
Copy link
Contributor

@kanekosh kanekosh left a comment

Choose a reason for hiding this comment

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

I tried re-running GHA but no luck. I think we can merge this for now and fix codecov later?

@kanekosh
Copy link
Contributor

@eytanadler Could you also bump the patch version?

@eytanadler
Copy link
Collaborator Author

Merging now sounds good since the tests are passing

@kanekosh kanekosh merged commit 5c28f3e into mdolab:main Apr 16, 2024
5 of 7 checks passed
@eytanadler eytanadler deleted the fix_totals_key branch April 16, 2024 18:00
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.

None yet

2 participants