FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix: move click to main dependencies and lazy-import tutorials in console.py by Copilot · Pull Request #881 · graphframes/graphframes · GitHub

Fix: move click to main dependencies and lazy-import tutorials in console.py - #881

Merged
rjurney merged 3 commits into
mainfrom
copilot/fix-code-review-suggestion
Aug 6, 2026
Merged

Fix: move click to main dependencies and lazy-import tutorials in console.py#881
rjurney merged 3 commits into
mainfrom
copilot/fix-code-review-suggestion

Conversation

Copilot AI commented Aug 3, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

console.py imported click at module level, but click was only declared under the tutorials optional group. A plain pip install graphframes-py would install the graphframes console script that immediately fails with ModuleNotFoundError: click.

What changes were proposed in this pull request?

  • python/pyproject.toml: Added [tool.poetry.dependencies] section with click = "^8.1.8" as a core runtime dependency; removed click from [tool.poetry.group.tutorials.dependencies].
  • python/graphframes/console.py: Moved from graphframes.tutorials import download inside main() 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 graphframes console script is always installed via [tool.poetry.scripts], so click must 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 the tutorials extra.

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
Copilot AI requested a review from rjurney August 3, 2026 21:46

rjurney left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Please revert the change to pyproject.toml

Comment thread python/pyproject.toml Outdated
"Code Repository" = "https://github.com/graphframes/graphframes"
"Bug Tracker" = "https://github.com/graphframes/graphframes/issues"

[tool.poetry.dependencies]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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>

Copilot AI commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Please revert the change to pyproject.toml

Reverted in 524c053~1 — pyproject.toml is back to its original state with click under [tool.poetry.group.tutorials.dependencies]. The only remaining change is the lazy-import of graphframes.tutorials.download inside main() in console.py.

Copilot AI requested a review from rjurney August 3, 2026 22:17

rjurney left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

lgtm

rjurney marked this pull request as ready for review August 5, 2026 02:19
rjurney merged commit 340dbe4 into main Aug 6, 2026
4 checks passed
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL