-
Notifications
You must be signed in to change notification settings - Fork 34
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
Support latest OpenMDAO version #70
Open
kanekosh
wants to merge
8
commits into
main
Choose a base branch
from
om_update
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #70 +/- ##
==========================================
- Coverage 82.08% 82.06% -0.02%
==========================================
Files 103 103
Lines 10717 10706 -11
==========================================
- Hits 8797 8786 -11
Misses 1920 1920 ☔ View full report in Codecov by Sentry. |
@eytanadler Tagging you just in case, but feel free to unsubscribe |
Thanks so much for coming back to this and fixing it @kanekosh! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
This PR resolves issue #65 which has been restricting OpenMDAO version to <=3.30.0. Now with this PR, OpenConcept should work with more recent OM versions (latest is 3.37.0 at this moment)
As explained in #65, OpenConcept uses
_setup_procs
(a private method in OM) inPhaseGroup
andIntegratorGroup
. The function signature for_setup_procs
changed in OpenMDAO 3.31._setup_procs
inPhaseGroup
. The_setup_procs
was used to pass down the duration variable name andnum_nodes
to the groups below it viaprob_meta
. ActuallyIntegratorGroup
is the only child group of thePhaseGroup
that refers to this information, and we don't need to useprob_meta
to pass down this info. To do so, this PR addsnum_nodes
option toIntegratorGroup
and drop Dymos/OpenConcept check (we have some old Dymos-related code but these are not really working and supported, so I believe we can just drop Dymos checks)._setup_procs
inIntegratorGroup
, though.IntegratorGroup
is a parent class and is always inherited by a user-defined class (typically AircraftModel). InIntegratorGroup
, we call_setup_procs
to automatically addode_integ
subsystem to this group, which will be later used with other user-defined subsystems in AircraftModel. I couldn't find a way to do this without using an OM private method. But good news is, now, the_setup_procs
doesn't need to access the arguments of this method, so we can use*args
and it works regardless of the number of arguments (which differs depending on OM version). Hence it works with both old and new OM versions.Note
This is not related to this fix, but I temporarily set OAS version requirement to 2.7.1 because OAS had a few changes since then that which changed the reference values of OAS-related tests. (Builds has been failing since last summer for this reason). I'll update the OAS reference values in a separate PR.
Also now we support new OM versions, so we should also update OpenConcept to support numpy 2. I'll work on it in another PR.
Type of change
What types of change is it?
Select the appropriate type(s) that describe this PR
Test
I deleted one of the tests on IntegratorGroup. This test has been checking if the IntegratorGroup raises an error as expected if it was used stand-alone (but not under PhaseGroup). Now I had to delete this check from IntegratorGroup to not rely on prob_meta. (In fact, I think this IntegratorGroup could be used stand-alone, although that doesn't make sense).
Checklist
Put an
x
in the boxes that apply.