-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add dependency check to project step runs #11226
Add dependency check to project step runs #11226
Conversation
Have you looked at the timing for this yet? |
Not yet, wanted to confirm this approach is acceptable before. |
If the basic |
So far they felt pretty instantaneous. Will benchmark with more extensive requirement files tomorrow. |
…ate_requirements(). Handle file reading in project_run().
Running the validation with this cobbled together list of requirements
takes - on my local machine - 0.33 seconds in an environment which has all of these dependencies installed and 0.21 seconds in one that's missing most of them. I think that's reasonable. |
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 think the conflicting dependencies message needs more info. If the conflict is further down in the tree, it's really unclear what's going on. I think we could either skip the conflicting packages check or maybe add more in the message to run pip check
or something, but right now it says there are conflicts for a package that seems to be installed correctly.
Like this is the output:
⚠ The following depencency conflicts were detected:
['spacy-streamlit>=1.0.0a0']
The conflict isn't obvious from this output.
And if I put in a non-existent future version, I still get the conflict instead of the requirement message:
⚠ The following depencency conflicts were detected:
['spacy-streamlit>=2.0.0a0']
If you want to reproduce this, the actual conflict is:
streamlit 1.9.2 has requirement click<8.1,>=7.0, but you have click 8.1.3.
If I put my whole working environment into the requirements (350 packages) it adds about 1 s to the running time. With a shorter/realistic list it looks like more like 0.1 s. Compared to the running time of actual steps, I think 0.1 s is acceptable.
Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>
Displaying the full message from |
The merge undid some other edits? |
…ments path redundancy.
Weird. But only f581955, right? Re-added the change. |
Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>
Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>
Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>
Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>
Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>
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.
Some final questions & comments, then this should be good to merge!
…:rmitsch/spaCy into feature/projects-automatic-install-check
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
…:rmitsch/spaCy into feature/projects-automatic-install-check
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.
It looks like the docs need one more round of prettier, but otherwise this looks good!
Goal
Ensure dependencies specified in
requirements.txt
are installed. Notes:Description
Uses
pkg_resources
to check whether all dependencies can be imported without issues. Note that this doesn't check the complete dependency tree - theoretically a sub-dependency might be missing or mismatched without this check noticing.Types of change
New feature.
Checklist