-
Notifications
You must be signed in to change notification settings - Fork 809
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
Fix: Resolve several issues with the require dependencies decorator #315
Fix: Resolve several issues with the require dependencies decorator #315
Conversation
Otherwise the 'Follow dependencies are missing ...' section is excluded if extras is not Truthy
to "github". This was causing CI test failures in unrelated PRs.
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.
LGTM!
Best guess is that github virtualenv caching is not behaving as expected :/ |
Thanks for reporting this @tomaarsen! I realized about the missing space but not about everything else... Also regarding |
It definitely could be a cache thing. I've seen e.g. the Python 3.8 job pass while the 3.9 job fails, despite that they should both install the same dependencies.
This is always really tricky. I've encountered this same problem very recently with requiring users to install sklearn/scikit-learn before using some functionality. I think we can get away with the behaviour from this PR currently. |
Note that issue 3 in particular was a breaking issue: I suspect that the GitHub ingest data connector is not usable for v0.5.0. It's a shame that the CI didn't pick it up earlier. |
Just verified it is indeed broken for 0.5.0 but works locally installing from main:
and verified installed with:
definitely worth a patch release! |
And fixing the fixture outputs:
https://github.com/Unstructured-IO/unstructured/actions/runs/4297066379/jobs/7489614747 I'll can pick this up in ~1-2 hours if nobody else does. |
Hello!
Pull Request overview
requires_dependencies
decorator:Details
Issue 1
The output of the
requires_dependencies
error was e.g.:I.e., no space between the sentences.
Issue 2
If
extras
was not provided, then the first part of the error message was not included, e.g.This was due to missing brackets.
Issue 3
The
GitHubConnector
was decorated withWhich attempts to import
pygithub
, which does not exist. Instead,github
must be imported.This all was causing test failures on some CI runs. For example here and here.
It is causing failures for my other PRs, e.g. #313 and #312.
Interestingly, the CI didn't fail every single time - I'm not quite sure why.
cc: @alvarobartt I believe these issues may negatively impact your PRs too.