Develop#86
Closed
christianchimezie wants to merge 58 commits into
Closed
Conversation
…LLM` querying with strategy-based execution, parallel model handling, multimodal message building, and weighted model scoring
…coding functions for `matplotlib` integration
…, performance, and fallback options
…on with key validation and model listing
…` models with endpoint, key validation, and model listing
… list_models, and validate_key methods
…orting text and multimodal queries with validation
… validation and supported models listing
…point with query, list_models, and key validation
…Ollama` models with query and validation
…th query, list_models, and key validation
…PI` with query, list_models, and key validation
…providers, manage `API` keys, and handle queries
…odels with iteration-based escalation
…order until success, with optional success tracking
…ghest-performance models with fallback to lower tiers
…l models for balanced usage
… 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
… license, and examples to `v0.1.3`
…arams (strategy, models, iterations, interactivity, timeout)
…, integration, and live test tiers - Reorganize test structure from single test/ directory to tests/ with unit/, integration/, and live/ subdirectories - Add @pytest.mark.live marker for opt-in live API tests requiring real credentials (GROQ_API_KEY, OPENAI_API_KEY) - Create tests/unit/ directory with mocked API tests: test_exceptions.py, test_explanations_unit.py, test_plot_generator.py, test_suggestions_unit.py - Create tests/integration/ directory with test fixtures for component interaction testing - Create tests/live/ directory with test_live_explanations.py and test_live_suggestions.py for real API calls - Consolidate shared fixtures into tests/conftest.py with session-scoped, data, plot, mock, and temporary file fixtures - Add unit-specific fixtures in tests/unit/conftest.py and live-specific fixtures in tests/live/conftest.py - Update TESTING.md documentation with new test structure, categories, markers, and execution examples - Update pytest.ini testpaths from "test" to "tests" and add new "live" marker - Update pytest.ini minversion from 8.3+ to 7.0+ to reflect actual requirement - Remove deprecated test/ directory and all old test files (conftest.py, test_exceptions.py, test_explanations.py, test_plotgen.py, test_suggestions.py) - Remove __pycache__ directories from git tracking (plotsense/, plotsense/explanations/, plotsense/visual_suggestion/) to honor .gitignore - Fix SmartPlotGenerator._create_scatter() to handle pandas StringDtype and other non-standard types using pd.api.types.is_numeric_dtype() fallback - Update .coverage metrics and pytest.log after test migration
…e dependencies
- environment.yml: add explicit version constraints for all AI provider packages (groq, openai, anthropic, google-genai>=1.69.0)
- pyproject.toml: add missing provider packages (openai, anthropic) and explicit google-genai>=1.69.0 version constraint to dependencies
- setup.py: update google-genai version constraint to >=1.69.0 for consistency
- requirements.txt: add version constraint google-genai>=1.69.0
- plotsense/core/providers/provider_manager.py: refactor _init_providers() to use api_keys as source of truth, validate restrict_to against available providers, add import for GroqOpenAIProvider, register groq_openai variant in SUPPORTED_PROVIDERS
- plotsense/core/providers/groq_openai.py: rename GroqProvider class to GroqOpenAIProvider for clarity and to avoid naming conflict with native Groq provider
- plotsense/core/ai_interface.py: remove broken finally block that was overriding successful query responses, add vendor extraction logic using split("_")[0], update all provider routing blocks to use exact vendor matching instead of substring matching, clarify _build_messages() parameter documentation
- pytest.ini: delete file (configuration now handled in pyproject.toml)
- tests/live/live_test_explanations.py: update to work with fixed provider selection logic
- tests/live/test_live_suggestions.py: update to work with fixed provider selection logic
- test_logs/pytest.log: update with latest test run results
…rent providers and models
…estions, and multi-provider features
…lement hidden API key input * refactor(provider-manager): redesign provider selection with selected_providers as source of truth - Rename parameter restrict_to → selected_providers to clarify semantic intent - Implement corrected logic: selected_providers determines which providers to initialize - api_keys now only supplies credentials, not selection criteria - Add _get_api_key_for_provider() method for interactive prompting of selected providers - Unselected providers are never initialized, validated, or prompted for - Implement filter logic: only initialize providers explicitly requested or with available keys - Update error messages to clearly specify missing credentials vs configuration issues - Add comprehensive docstring explaining design principle * feat(registry): load provider/model metadata from dynamic registry instead of hardcoded values - Update all provider files to call registry.get_provider_models() instead of returning hardcoded lists - Update groq.py, groq_openai.py, openai_chat.py, openai_response.py, anthropic.py, gemini.py - Update azure_openai.py, ollama_openai.py to use registry for model lists - Move model_costs hardcoded dict in ProviderManager to call registry.get_model_costs() - All providers now fetch models dynamically from loaded registry system * feat(security): implement hidden API key input using getpass module - Update prompt_for_api_key() to use getpass.getpass() instead of builtins.input() - API keys no longer echoed to terminal, preventing storage in shell logs/history - Improve prompt text for required vs optional key entry - Apply same hiding to VisualizationRecommender interactive key input - Add comprehensive docstring for prompt function parameters and return value * fix(error-handling): improve PlotExplainer model validation and error messages - Expand vendor-level model selections to match all provider variants - Validate requested models exist in registry before initialization - Generate clear error messages listing supported models per provider - Add logic to check vendor availability before attempting queries - Prevent cryptic "no available models" errors by validating selections upfront * test(provider-selection): update tests to verify corrected provider selection behavior - Update test_selected_provider_missing_key to expect new error messages - Rename restrict_to to selected_providers in all test calls - Update test_restrict_to_filters_available_providers test - Update TestEdgeCases tests for new validation behavior - Add TestSelectedModelsSourceOfTruth test class with new test cases * test(live): update live tests to work with redesigned provider selection - Update live_test_explanations.py to use selected_models parameter correctly - Update live_test_suggestions.py to use new provider selection semantics - Ensure tests work with both interactive and non-interactive modes
…d add selected_models to notebook
…i-provider testing notebooks
…rs.json and update notebook interactive parameters
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.
Pull Request
Description
Type of Change
Related Issues
Closes #
Related to #
Changes Made
Documentation
Checklist