Skip to content

Allow PlotGenerator init without suggestions; make Groq dependency optional#75

Open
tosincarik wants to merge 2 commits into
PlotSenseAI:mainfrom
tosincarik:fix/plotgenerator-optional-suggestions-and-groq-optional
Open

Allow PlotGenerator init without suggestions; make Groq dependency optional#75
tosincarik wants to merge 2 commits into
PlotSenseAI:mainfrom
tosincarik:fix/plotgenerator-optional-suggestions-and-groq-optional

Conversation

@tosincarik
Copy link
Copy Markdown

Summary

This PR fixes a mismatch between type hints and runtime behavior in PlotGenerator, and improves install/import ergonomics by making the groq dependency optional.

Changes

PlotGenerator

  • Allow initializing PlotGenerator(..., suggestions=None) (matches Optional[pd.DataFrame] signature).
  • Raise a clear ValueError when generate_plot() is called without suggestions.
  • Add a regression test covering the new behavior.

Optional Groq dependency

  • Guard Groq imports with try/except ImportError so import plotsense works without groq installed.
  • Skip Groq key validation when the Groq client isn’t available.
  • Update tests to handle the optional-dependency behavior.

Notes

  • This PR contains two commits:
    • Allow PlotGenerator initialization without suggestions
    • Make Groq dependency optional in tests

@christianchimezie
Copy link
Copy Markdown
Collaborator

Hi @tosincarik, apologies for just getting back to this. The active branch is the developer branch, hence it is the developer branch that should be cloned or forked and merged back into.

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.

2 participants