-
Notifications
You must be signed in to change notification settings - Fork 12
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
Tests and updates #92
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #92 +/- ##
===========================================
+ Coverage 44.78% 49.78% +5.00%
===========================================
Files 42 43 +1
Lines 4615 4744 +129
Branches 958 988 +30
===========================================
+ Hits 2067 2362 +295
+ Misses 2359 2149 -210
- Partials 189 233 +44
|
Tests now pass. For future reference, I had to add the explicit @ml-evs @davidwaroquiers if you are fine with the structure of the tests I will also update the developer documentation accordingly. I admit I was hoping to get an increase in the coverage higher than just 5%. I am not sure if it is counting correctly the tests on the CLI and I suppose all the processes that run "remotely" will not be considered either. |
I dug into this a bit and I'm confused, codecov reports 21% coverage of jobflow_remote.cli.job as it stands, but when I run the same test invocation locally, I get 61%, which sounds more realistic:
codecov even reports 0% on the |
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.
Again, nothing jumps out here to comment on, the test additions look great (and its a shame coverage seems to be misreported -- hopefully possible to fix this in the future). All good on my side to do a release.
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.
Again, nothing jumps out here to comment on, the test additions look great (and its a shame coverage seems to be misreported -- hopefully possible to fix this in the future). All good on my side to do a release.
This PR introduces several new tests and some tools to run then (e.g. to execute the test on CLI commands and options in the runner to run a single job).
Some of the new tests are under the
integration
folder. Others are under the newdb
folder. They do not require the docker containers, but need a mongodb database. Locally they are executed with a standard mongodb installation, or, if not available, with pymongo_inmemory. On github the mongodb should be thelocal_mongodb
service.Writing the tests some minor bugs were identified and fixed.
One notable change is that now the
Runner.run
does not call theRunner.cleanup
method anymore and the caller should call it. It was more convenient for tests, but it is also more reasonable for a couple of reasons: 1) the code may have failed before getting to thetry...finally
, so it was not guaranteed that thecleanup
was really called 2) the caller may need control over the Runner object (e.g. may be reused after callingrun
)