-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Python] Add requirements.txt and test #5408
Conversation
@oshadura How can I get the path to the |
Supposing the test is under "path/to/root/bindings/pyroot_experimental/pythonizations/test/" you could do:
Though I wonder whether the requirements.txt file would be better suited under the bindings folder since it's python related? |
I get what you mean, but in this case I don't think the location of the |
Do we run the tests always from the source directory? I'm not 100% sure about this. |
I believe that |
There is also |
Nice! That's actually a quite nice solution, and could be viable for the tests. Just hope you don't move the source dir ;) Could be a start! |
Hi, |
@eguiraud Good question! I don't know whether we want to enforce this a configuration time. Would make sense, tbh, though this would enforce much more stricter requirements than the ones we have now. |
We don't have this option anymore :) Now it is "pyroot"... |
Why not to add in "dev" option? |
So I think what we agreed on on Mattermost: We want the thingy, but no checks at configure time (because it's not a build time dependency). We still have to iterate how exactly we want to check at test time the dependencies, but I think at a first shot, the current impl is good enough. Feel free to argue :) |
@phsft-bot build |
Starting build on |
1 similar comment
Starting build on |
Build failed on ROOT-fedora31/noimt. Failing tests: |
Build failed on mac1015/cxx17. Failing tests: |
But it's a good question, because we do not depend on pandas like on jupyter or numba. we just support to push data to it and test a specific interface of pandas. |
Starting build on |
Build failed on ROOT-debian10-i386/cxx14. Failing tests: |
Here an example from the failure above how the diagnostics look like:
|
We should merge root-project/rootspi#81 first and retry the PR build (afaik rootspi is getting fetched again on each build). |
@phsft-bot build |
Starting build on |
@eguiraud I would say the CI is happy ;) |
You think it's good to go like this? It does not have yet all dependencies, e.g., the ones for TMVA experimental are missing. Though we should could have with this a first run through the nightlies and fix failures in our infrastructure (missing packages, version mismatches, ...). |
I think there should be little failures since we switch already long ago to the "just fail the test" mode. But you never know :) |
There is a ton of tutorials that would fail that currently do not run, see #5938 . But I don't think this PR interferes with that, right @hageboeck ? |
They are kind of doing the same thing, but #5938 is dumb. It only checks if it can For this, however, it would be nice if you could ask for specific packages. So the thing would look up numba in the requirements, and test if the correct version is installed to run a tutorial or test. This way, we would also get a cross-check that dependencies of tests/tutorials are actually in requirements.txt. |
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.
Alright, I think this can go in and together with the labels that #5938 adds it should address what we agreed upon at yesterday's meeting
I edited my previous comment, maybe check again. |
Also, we might be missing numpy, keras, xgboost in the requirements. |
And pandas. |
This PR solves the problem of documenting our python requirements and adding a test that checks if we satisfy them at runtime. #5938 solves three main problems (plus a couple smaller things): a bug in an RDF tutorial, a bug in the vetoing of tutorials, and it adds a nice-to-have, namely having a single test fail that's clearly called "test-if-numba-is-there" rather than having all numba tests red. If what I said above is in the ballpark of correct, there is no conflict with #5938. so I still think this PR could go in modulo the missing requirements -- consider my approval conditional to agreeing on what should go in requirements.txt (i'll stay out of the discussion about whether pandas should be in there or not :D) |
Alrighty, I'll add |
I guess that's what Philippe meant. You can merge as-is, and I'll adapt the other PR accordingly. Let's maybe agree that the ML things are not hard requirements. |
Starting build on |
For me it means that we have actually no idea whether some things work or not ;) I've added numpy and that's good for now. I think it's overkill to add the TMVA deps now, because I also don't know exactly what the required versions are. |
There's now https://sft.its.cern.ch/jira/browse/ROOT-10909 to track this issue. |
Build failed on ROOT-fedora31/noimt. Failing tests: |
Proposal to add a
requirements.txt
file and a corresponding test checking the dependencies also by the version requirement.The test throws an error for each dependency seperately due to the
SubTest
. A single exception looks like this:@eguiraud @Axel-Naumann @etejedor @oshadura Ping :)