-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Test packages #1037
Test packages #1037
Conversation
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.
Love it! ❤️
I left a couple doc string change suggestions and one comment about what to test inline.
I wonder what your thoughts are on what we do in the case where a test fails because of a problem with a single upstream package, but that the rest of packages across image(s) all work correctly. Do we hold up releasing any further changes in the images here until we resolve the problem upstream? Do we choose to ignore the failing test and continue releasing unrelated changes here while building images with clearly broken dependencies?
@parente Thanks for the positive feedback and for the relevant review. 😄 To answer your question, my opinion is to fail if an import error is raised -- if it's not the case users may have a problem and could open an issue. However in some case it could be interesting to ignore some errors. To be ready to do it, I have modified the code to introduce a if len(failures) > max_failures:
raise AssertionError(failures)
elif len(failures) > 0:
LOGGER.warning(f"Some import(s) has(have) failed: {failures}") I have committed all the change except the parsing of the package bug ... So I'm flagging it as WIP. See you. |
@parente I'm waiting for the CI to finish, but I think it's OK now. |
Let's give it a shot! Thanks for putting this testing in place. |
This test module tests if R and Python packages installed can be imported.
It's a basic test aiming to prove that the package is working properly.
The goal is to detect import errors that can be caused by incompatibilities between packages for example:
sympy
pyarrow
This module checks dynmamically, through the
CondaPackageHelper
, only the specified packages i.e. packages requested byconda install
in theDockerfiles
.This means that it does not check dependencies. This choice is a tradeoff to cover the main requirements while achieving reasonabe test duration.
However it could be easily changed (or completed) to cover also dependencies
package_helper.installed_packages()
instead ofpackage_helper.specified_packages()
.Example: