Markdown Converter
Agent skill for markdown-converter
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Interactive ML dashboard for car sales forecasting built with Reflex (Python full-stack framework) and SARIMAX time series models. The application allows real-time manipulation of exogenous variables to see their impact on sales forecasts.
# Start development server reflex run # Windows development with SSL fixes run_reflex.bat # Unix/Linux development ./run_reflex.sh
# Run all tests pytest # Run with coverage report pytest --cov=car_sales_dashboard --cov-report=html # Run specific test categories pytest -m unit # Unit tests only pytest -m integration # Integration tests pytest -m performance # Performance tests pytest -m smoke # Quick smoke tests
# Docker build and run docker-compose up --build # Production deployment ./deploy.sh # Compile requirements (when updating dependencies) ./scripts/compile-requirements.sh
# Format code black car_sales_dashboard/ isort car_sales_dashboard/ # Type checking mypy car_sales_dashboard/ # Linting flake8 car_sales_dashboard/
The app follows a modular architecture with clear separation of concerns:
State Management: Centralized in
car_sales_dashboard/state.py using Reflex's reactive state system. All UI updates flow through state mutations.
Component Organization:
components/charts.py: Plotly-based interactive charts that respond to state changescomponents/controls.py: User input controls (sliders, dropdowns) that modify exogenous variablescomponents/tables.py: Data tables with filtering and sortingcomponents/exogenous_chart.py: Specialized chart for exogenous variable visualizationML Pipeline:
models/scenario_engine.py implements SARIMAX forecasting with:
Data Flow:
rx.State for reactive state managementrxconfig.py configurationRequires Python 3.10+ (supports 3.10, 3.11, 3.12). Check
pyproject.toml for exact constraints.
rxconfig.pydocker-compose.ymlSQLite database at
sqlite:///auto_sales.db - automatically created on first run.
models/scenario_engine.py following SARIMAX patterncomponents/charts.py using Plotlycomponents/controls.py with state bindingsmodels/data.py data loading logictests/ directorycar_sales_dashboard/exceptions.py for custom exceptionsutils/logging_config.pyRun
run_reflex.bat which includes SSL certificate fixes.
If model training is slow, check Redis connection in production or consider increasing cache TTL in
models/scenario_engine.py.
Ensure state mutations are done through proper Reflex state methods and not direct assignment.
Check Python version compatibility and ensure all requirements are properly pinned in
requirements/base.txt.