Skip to content

test/unit-tests#67

Open
DYung26 wants to merge 72 commits into
PlotSenseAI:developfrom
DYung26:test/unit-tests
Open

test/unit-tests#67
DYung26 wants to merge 72 commits into
PlotSenseAI:developfrom
DYung26:test/unit-tests

Conversation

@DYung26
Copy link
Copy Markdown
Contributor

@DYung26 DYung26 commented Oct 31, 2025

This pull request introduces major enhancements to the PlotSense package, focusing on expanding AI model provider support, updating dependencies, and improving documentation and usability. The most important changes are the addition of new LLM provider integrations (Groq, Gemini, Anthropic, Azure OpenAI), updates to package metadata and dependencies, and improvements to usage examples and documentation. These changes make PlotSense more flexible and robust for AI-powered data visualization.

AI Model Provider Integrations

  • Added new provider classes for Groq (plotsense/core/providers/groq.py), Gemini (plotsense/core/providers/gemini.py), Anthropic (plotsense/core/providers/anthropic.py), and Azure OpenAI (plotsense/core/providers/azure_openai.py), each with methods for querying, listing models, and validating API keys. All providers inherit from a new abstract base class (plotsense/core/providers/base.py). [1] [2] [3] [4] [5]

  • Introduced a new strategy enumeration for model selection (plotsense/core/enums/strategy.py).

Dependency and Metadata Updates

  • Updated required dependencies to include groq, anthropic, openai, google-genai, python-dotenv, and requests, and raised the minimum matplotlib version to 3.8.0. Package metadata now reflects new authors, license change to Apache 2.0, and improved project URLs. [1] [2] [3]

  • Added new source files and expanded package structure to support new features and tests. [1] [2] [3]

Documentation and Usage Improvements

  • Significantly updated the documentation in PKG-INFO to reflect new features, usage patterns, supported plots, and workflow examples. Improved code examples for plot generation and explanation, clarified API authentication, and added a feedback form link. [1] [2] [3] [4] [5]

API Changes and Refactoring

  • Updated main package imports to expose new generator classes (BasicPlotGenerator, SmartPlotGenerator) in plotsense/__init__.py.

License and Contributor Updates

  • Changed project license from MIT to Apache License 2.0 and expanded the list of authors and contributors. [1] [2]

These changes collectively make PlotSense more extensible, easier to use, and ready for advanced AI-powered data visualization workflows.

…LLM` querying with strategy-based execution, parallel model handling, multimodal message building, and weighted model scoring
…coding functions for `matplotlib` integration
…` models with endpoint, key validation, and model listing
…orting text and multimodal queries with validation
…point with query, list_models, and key validation
…th query, list_models, and key validation
…PI` with query, list_models, and key validation
…providers, manage `API` keys, and handle queries
…order until success, with optional success tracking
…ghest-performance models with fallback to lower tiers
… provider/model pairs with iteration-aware selection
…ace` and `ProviderManager` with strategy-based model selection, remove `Groq`-specific hardcoding, and unify image handling
…add new `AI/LLM` packages; update `setup.py` to read `README` safely and include additional dependencies
…arams (strategy, models, iterations, interactivity, timeout)
… switch to registry-based unified plotgen `API` using `Basic/Smart` generators
… into structured visualization recommendations
…ting model querying, parsing, and ensemble scoring
…gic to dedicated `recommender` module

- Removed the inlined `VisualizationRecommender` class from `suggestions.py` and imported it from `visual_suggestion.recommender`
- Simplified `suggestions.py` to serve as a lightweight interface for visualization recommendation
- Updated `__init__.py` imports to correctly expose `VisualizationRecommender` from its new package
- Enhanced `recommender()` function to support:
  - `StrategyName` parameter for configurable model selection strategy
  - `selected_models`, `interactive`, and `timeout` arguments for flexible runtime behavior
- Improved module clarity and reduced redundancy by centralizing model, API, and ensemble logic under the recommender system
…tgen extensions, and message orchestration
…ining chat, audio, file, and realtime clients
…tool OpenAI function calling (plotgen, explainer, recommender)
…t` assistant with user instruction injection
…nd `SmartPlotGenerator`, replacing deprecated `PlotGenerator`
… `PlotExplainer` and explainer `API` coverage
…icPlotGenerator`, `SmartPlotGenerator`, and `plotgen` integration tests
…`VisualizationRecommender` initialization, parsing, and `LLM` integration
…est_suggestions` into `test/unit` for clearer test structure organization
…recommender` modules with consistent `API` handling and helper usage

- Added default argument values to `VisualizationRecommender` and `PlotExplainer` constructors for strategy, models, timeout, and interactivity
- Introduced `self.api_keys` and standardized `ProviderManager` initialization across both components
- Updated `test_explanations` to use shared helper functions `encode_image` and `save_plot_to_image` from `core.utils`
- Revised `test_plotgen` to align with new `_default_plots` naming and initialization logic
- Refactored `test_suggestions` to leverage new `ResponseParser`, updated recommendation pipeline, and aligned prompt/query flow
- Commented deprecated internal tests tied to removed private methods (`_get_all_recommendations`, `_parse_recommendations`, etc.)
- Ensured test assertions verify model availability and provider correctness under new recommender structure
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.

1 participant