-
Notifications
You must be signed in to change notification settings - Fork 251
Replace deprecated imp.load_source call #2871
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
base: main
Are you sure you want to change the base?
Replace deprecated imp.load_source call #2871
Conversation
Regression Testing Results
Detailed regression test results.Regression test aromatics:Reference: Execution time (DD:HH:MM:SS): 00:00:00:49 aromatics Passed Core Comparison ✅Original model has 15 species. aromatics Passed Edge Comparison ✅Original model has 106 species. DetailsObservables Test Case: Aromatics Comparison✅ All Observables varied by less than 0.500 on average between old model and new model in all conditions! aromatics Passed Observable Testing ✅Regression test liquid_oxidation:Reference: Execution time (DD:HH:MM:SS): 00:00:01:56 liquid_oxidation Passed Core Comparison ✅Original model has 37 species. liquid_oxidation Failed Edge Comparison ❌Original model has 214 species. DetailsObservables Test Case: liquid_oxidation Comparison✅ All Observables varied by less than 0.100 on average between old model and new model in all conditions! liquid_oxidation Passed Observable Testing ✅Regression test nitrogen:Reference: Execution time (DD:HH:MM:SS): 00:00:01:02 nitrogen Passed Core Comparison ✅Original model has 41 species. nitrogen Passed Edge Comparison ✅Original model has 133 species. DetailsObservables Test Case: NC Comparison✅ All Observables varied by less than 0.200 on average between old model and new model in all conditions! nitrogen Passed Observable Testing ✅Regression test oxidation:Reference: Execution time (DD:HH:MM:SS): 00:00:01:48 oxidation Passed Core Comparison ✅Original model has 59 species. oxidation Passed Edge Comparison ✅Original model has 230 species. DetailsObservables Test Case: Oxidation Comparison✅ All Observables varied by less than 0.500 on average between old model and new model in all conditions! oxidation Passed Observable Testing ✅Errors occurred during observable testing
WARNING:root:Initial mole fractions do not sum to one; normalizing.
|
JacksonBurns
left a comment
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.
I'd just add a link to this function, since it's a bit wacky, but otherwise looks good to me! Thanks.
imp is deprecated and is getting removed in Python 3.12. documentation here shows the official suggestion for replacing imp.load_source calls: https://docs.python.org/3/whatsnew/3.12.html#imp
Add link to documentation showing recommended way to replace imp.load_source Co-authored-by: Jackson Burns <33505528+JacksonBurns@users.noreply.github.com>
9523429 to
148131f
Compare
@JacksonBurns Thanks for the review! I just noticed the CI is failing a couple tests. Probably not too dangerous to merge this PR anyways, but I'll see if I can fix those real quick on a separate PR so everything is passing. |
imp is deprecated and is getting removed in Python 3.12. documentation here shows the official suggestion for replacing imp.load_source calls: https://docs.python.org/3/whatsnew/3.12.html#imp
Motivation or Problem
Tiny PR to replace deprecated call to imp.load_source
Description of Changes
Changes adopted from official documentation:
https://docs.python.org/3/whatsnew/3.12.html#imp
Testing
Should be good to go as long as the CI tests pass. All the code is responsible for is loading the recommended families.