PANTHER Core Framework¤
Foundation modules for experiment management and testing infrastructure
The core modules provide the essential functionality that powers the PANTHER framework, including experiment orchestration, configuration management, event-driven communication, and command-line operations.
For Framework Developers
This documentation is intended for developers working on PANTHER's core framework or those needing to understand the internal architecture. For plugin development, see the Plugin Development Guide.
Core Functional Groups¤
PANTHER's core is organized into focused functional groups, each with comprehensive documentation:
Functional Group | Purpose | Documentation |
---|---|---|
Experiment Engine | Test execution orchestration and lifecycle management | Core experiment coordination |
Configuration System | Schema-driven configuration loading and validation | Type-safe YAML configuration |
Observer Pattern | Event-driven component communication | Decoupled architecture |
CLI Interface | Command-line operations and user interaction | Primary user interface |
Module Organization¤
Core Components by Directory¤
Modular Architecture
Each core component is designed to be independent and replaceable. This modular design allows for future enhancements without breaking existing functionality.
panther/core/
├── experiment_manager.py # Central experiment orchestration
├── experiment_strategy.py # Test execution strategies
├── test_cases/ # Test framework interfaces
├── observer/ # Event-driven communication
├── results/ # Result collection and processing
├── exceptions/ # Framework-specific errors
└── utils/ # Supporting utilities
Related Systems¤
panther/config/ # Configuration management
├── config_manager.py # Configuration loading and validation
├── config_global_schema.py # Global configuration schema
├── config_experiment_schema.py # Experiment configuration schema
└── plugin_params.py # Plugin parameter discovery
panther/__main__.py # CLI entry point and command routing
Integration Overview¤
The core systems work together to provide a cohesive framework:
Flow:
- CLI processes user commands and loads configurations
- Configuration System validates and provides typed configuration
- Experiment Engine orchestrates test execution using configuration
- Observer Pattern coordinates component communication through events
- Results System collects and processes test outputs (event-driven)
Component Interaction¤
┌─────────────────┐ ┌──────────────┐ ┌─────────────┐
│ Experiment │───▶│ Event │───▶│ Observers │
│ Manager │ │ Manager │ │ │
└─────────────────┘ └──────────────┘ └─────────────┘
│ │ │
▼ ▼ ▼
┌─────────────────┐ ┌──────────────┐ ┌─────────────┐
│ Plugin │ │ Test Cases │ │ Results │
│ Manager │ │ │ │ Manager │
└─────────────────┘ └──────────────┘ └─────────────┘
Quick Start¤
Basic Experiment Execution¤
# filepath: /Users/elniak/Documents/Project/PANTHER/panther/__main__.py
from panther.config.config_manager import ConfigLoader
from panther.core.experiment_manager import ExperimentManager
# Load configuration
config_loader = ConfigLoader("experiment_config.yaml")
global_config = config_loader.load_and_validate_global_config()
# Create and run experiment
experiment_manager = ExperimentManager(global_config=global_config)
experiment_config = config_loader.load_and_validate_experiment_config()
experiment_manager.initialize_experiments(experiment_config)
experiment_manager.run_tests()
Command Line Usage¤
# Run experiment
panther --experiment-config config.yaml
# Validate configuration
panther --validate-config --experiment-config config.yaml
# List plugin parameters
panther --list-plugin-params quiche
Development Guidelines¤
Extending Core Functionality¤
- Follow the Observer Pattern — Use events for component communication
- Maintain Type Safety — Use dataclasses and proper type annotations
- Plugin Integration — Ensure new features work with the plugin system
- Documentation — Update functional group docs for significant changes
Code Organization¤
- Single Responsibility — Each module has a clear, focused purpose
- Dependency Injection — Components receive dependencies through constructors
- Error Handling — Use custom exceptions from
panther/core/exceptions/
- Testing — Write tests that validate both success and error scenarios
Related Documentation:
- Configuration Guide — Complete YAML configuration reference
- Plugin Development — Creating framework extensions
- Quick Start — Getting started with PANTHER