Replace check_notebook.sh with appropriate Python script (New)#1725
Replace check_notebook.sh with appropriate Python script (New)#1725
check_notebook.sh with appropriate Python script (New)#1725Conversation
check_notebook.py is going to replace check_notebook.sh, and it uses some utilities from common.py (which later Python scripts will also use).
those Python files were scripts that were being submitted to the notebook pods. These scripts are now in-line in the check_notebook.py
it is required that dss is purged before the integration tests are run, hence a tenmporary job for it has been added that does not do any explicit verification that the purge was successful (except for exit code perhaps). This tmp dss/purge job will be replaced by a better impl in #1725
fernando79513
left a comment
There was a problem hiding this comment.
Thanks for the PR and sorry for taking so long to review it.
I have added some comments here and there, but the main concern is that this PR is much more complex that it needs to be.
There are too many helper functions that could be simplified since they are not adding anything important to the test.
If something is not clear enough, please ping me so we can discuss it.
contrib/checkbox-dss-validation/checkbox-provider-dss/bin/check_notebook.py
Outdated
Show resolved
Hide resolved
contrib/checkbox-dss-validation/checkbox-provider-dss/bin/check_notebook.py
Outdated
Show resolved
Hide resolved
contrib/checkbox-dss-validation/checkbox-provider-dss/bin/check_notebook.py
Outdated
Show resolved
Hide resolved
contrib/checkbox-dss-validation/checkbox-provider-dss/bin/check_notebook.py
Outdated
Show resolved
Hide resolved
contrib/checkbox-dss-validation/checkbox-provider-dss/bin/check_notebook.py
Outdated
Show resolved
Hide resolved
contrib/checkbox-dss-validation/checkbox-provider-dss/bin/check_notebook.py
Outdated
Show resolved
Hide resolved
contrib/checkbox-dss-validation/checkbox-provider-dss/bin/check_notebook.py
Outdated
Show resolved
Hide resolved
contrib/checkbox-dss-validation/checkbox-provider-dss/bin/common.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Fernando Bravo <39527354+fernando79513@users.noreply.github.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1725 +/- ##
==========================================
+ Coverage 49.23% 49.47% +0.23%
==========================================
Files 373 376 +3
Lines 40400 40591 +191
Branches 6822 6822
==========================================
+ Hits 19890 20081 +191
Misses 19784 19784
Partials 726 726
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
motjuste
left a comment
There was a problem hiding this comment.
I have replied to all the comments, accepted one change to add coverage reporting, and will work on updating the Copyright banners on the rest. @fernando79513 please have a look at my clarifications and questions for the rest of the comments.
|
With the recent commits, I have integrated more suggestions and resolved relevant conversations from my side. For the rest, I have provided my justifications. |
contrib/checkbox-dss-validation/checkbox-provider-dss/bin/check_notebook.py
Outdated
Show resolved
Hide resolved
|
Thank you for the recent comments. I am working on incorporating your suggestions and will update. |
Let's not chicken out
check_notebook.sh with and appropriate Python script (New)check_notebook.sh with appropriate Python script (New)
|
I am working on shipping the scripts as part of |
contrib/checkbox-dss-validation/checkbox-provider-dss/bin/check_notebook.py
Outdated
Show resolved
Hide resolved
|
Helo @motjuste! |
Running these scripts never timeout in practice, and shouldn't based on where we are going. Nevertheless, timeout can be set by the caller, e.g. like `timout 5m check_notebook.py ...`
The script and associated jobs are BROKEN in this commit
|
Hey @fernando79513, I believe I have now covered all your requests from the review (thanks a LOT for the very careful and useful comments!). I have updated the PR's description now to reflect what will be merged. |
fernando79513
left a comment
There was a problem hiding this comment.
Thank you for all the changes!
Really good job here.
- Moved the in-line Python scripts that need to be run in the pods from check_notebook.sh to individual scripts in the data directory. - Added a check_notebook.py that accepts a notebook's name and the name of the script to run in its pod, finds the appropriate pod and runs the script in that pod. - Replaced existing uses of check_notebook.sh in the jobs to analogous uses of check_notebook.py. - Removed the now obsolete check_notebook.sh. - Added unit-tests for check_notebook.py, and the ability to run them using tox. - Added a new GitHub workflow to run these unit-tests for any PRs to this contrib area.
Description
This is the first piece of the original PR #1724 to enable easier review. The main changes in this PR include (after also applying the requests from review):
check_notebook.shto individual scripts in thedatadirectory.check_notebook.pythat accepts a notebook's name and the name of the script to run in its pod, finds the appropriate pod and runs the script in that pod.check_notebook.shin the jobs to analogous uses ofcheck_notebook.py.check_notebook.sh.check_notebook.py, and the ability to run them usingtox.contribarea.Resolved issues
Documentation
No changes to Checkbox documentation.
Tests
Please see comment from codecov for the coverage report for unit-tests added in this PR. This branch was also verified to run in Testflinger.