-
Notifications
You must be signed in to change notification settings - Fork 106
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
adding new mphys wrapper and removing the old openmdao wrappers #196
Conversation
What do you recommend for testing @joanibal? Do we want to just move what we had in MPhys or do we want to add new tests on top? |
Codecov Report
@@ Coverage Diff @@
## main #196 +/- ##
==========================================
- Coverage 43.32% 40.62% -2.71%
==========================================
Files 15 13 -2
Lines 3550 3769 +219
==========================================
- Hits 1538 1531 -7
- Misses 2012 2238 +226
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
I'd like to add some tests here too. With all the changes we make to ADflow, It's worth checking that they didn't break the MPhys wrapper. |
Should we copy the tests? or maybe we can run the ADflow tests in the mphys repo when changes are made to ADflow. |
I would like to have a few adflow only mphys tests here. not sure how we can only run adflow tests on mphys side when adflow changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also fix the style checks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, I could not get the mphys wrapper to import properly when not using pip install -e .
.
I tried pip install .
, but it didn't work for me.
Right. Is there a better approach for the import here? I can check if openmdao is available and then import but that results in weird side-effects |
I think the way to do this is to update |
It appears to still be broken
|
Did you try either of the approaches I mentioned? I don't think Anil pushed anything related to setup.py. |
@joanibal I pushed up the changes and they work locally for me. |
I tested @nwu63's changes and they worked great for me. I dont think it imports the mphys builder by default, it can import it regardless of an in place install or a site packages install, and it complains that I dont have openmdao if I try to import it w/o having openmdao installed, but I can still import the ADFLOW class. On top of this, I added the requirements list for the mphys wrapper because it uses openmdao, mphys, and also idwarp. @joanibal can you check the imports again with the current state of the PR? |
It works for me after the changes |
Purpose
This PR removes the old
om_adflow
wrapper and moves the new MPhys ADflow wrapper from the MPhys repo to the ADflow repo. Importing ADflow on its own should not trigger an import of the MPhys wrapper, so we also do not need the OpenMDAO warning. To import the new mphys wrapper:which is the only class needed from ADflow for MPhys.
Expected time until merged
Type of change
Testing
We can discuss how we want to add tests now that MPhys is open-source and the solver repos have their own builders.