-
Notifications
You must be signed in to change notification settings - Fork 230
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
Restart attribute error #1847
Restart attribute error #1847
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1847 +/- ##
==========================================
+ Coverage 44.22% 44.22% +<.01%
==========================================
Files 83 83
Lines 21539 21538 -1
Branches 5644 5645 +1
==========================================
Hits 9526 9526
+ Misses 10957 10942 -15
- Partials 1056 1070 +14
Continue to review full report at Codecov.
|
rmgpy/rmg/mainTest.py
Outdated
cls.rmg = RMG(input_file=os.path.join(cls.testDir, 'restart_no_filters.py'), | ||
output_directory=os.path.join(cls.outputDir)) | ||
|
||
cls.rmg.execute() |
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 feel like executing the job should be part of the test method rather than in setup.
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 agree. Sorry, I copied from the tests above, but I agree this makes more sense.
38b09c5
to
d50cf62
Compare
The first test restarts the minimal example after ~20 species and includes filters. The second test restarts the super-minimal example after ~9 species and does not include filters.
d50cf62
to
e14e85a
Compare
Motivation or Problem
See #1846
Description of Changes
This PR address the issue identified in #1846, as well as dealing with a deprecation warnings we were getting from h5py. Finally, this PR adds functional tests that run restart jobs (both with and without filters) to try to catch errors like this in the future.
Testing
The functional tests added should catch the error this PR addresses
Additional note
The functional tests simply check that the restart jobs can complete. A more robust test would be ensure that the same model is achieved, but this would require running a full RMG job, and then restarting from an intermediate seed. For the sake of time in running our tests, this was not implemented.
On my computer, the whole suite of tests in mainTest.py including the new functional tests can run in less than 150 seconds, so I don't think this will drastically increase our testing time.