Fix: move click to main dependencies and lazy-import tutorials in console.py - #881
Merged
Conversation
Co-authored-by: rjurney <42149+rjurney@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix code based on review comment feedback
Fix: move click to main dependencies and lazy-import tutorials in console.py
Aug 3, 2026
rjurney
requested changes
Aug 3, 2026
rjurney
left a comment
Collaborator
There was a problem hiding this comment.
Please revert the change to pyproject.toml
| "Code Repository" = "https://github.com/graphframes/graphframes" | ||
| "Bug Tracker" = "https://github.com/graphframes/graphframes/issues" | ||
|
|
||
| [tool.poetry.dependencies] |
Collaborator
There was a problem hiding this comment.
Why did you move this here? I think it belongs under tutorials, since it is required for the CLI. I don't want a separate dependency group of one package.
Contributor
Author
There was a problem hiding this comment.
Reverted — click is back under [tool.poetry.group.tutorials.dependencies] only. The [tool.poetry.dependencies] section has been removed.
Co-authored-by: rjurney <42149+rjurney@users.noreply.github.com>
Contributor
Author
Reverted in 524c053~1 — |
SemyonSinchenko
approved these changes
Aug 4, 2026
rjurney
approved these changes
Aug 5, 2026
rjurney
marked this pull request as ready for review
August 5, 2026 02:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
console.pyimportedclickat module level, butclickwas only declared under thetutorialsoptional group. A plainpip install graphframes-pywould install thegraphframesconsole script that immediately fails withModuleNotFoundError: click.What changes were proposed in this pull request?
python/pyproject.toml: Added[tool.poetry.dependencies]section withclick = "^8.1.8"as a core runtime dependency; removedclickfrom[tool.poetry.group.tutorials.dependencies].python/graphframes/console.py: Movedfrom graphframes.tutorials import downloadinsidemain()as a lazy import, so the optional tutorial packages (py7zr,requests) are not loaded at import time — only when the CLI is actually invoked.Why are the changes needed?
The
graphframesconsole script is always installed via[tool.poetry.scripts], soclickmust be a core dependency, not an optional one. Lazy-importing the tutorials module avoids pulling in heavy optional deps (py7zr,requests) for users who haven't installed thetutorialsextra.