-
Notifications
You must be signed in to change notification settings - Fork 0
Create comprehensive CLAUDE.md for AI assistant guidance #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,213 @@ | ||||||
| # CLAUDE.md - AI Assistant Guide for Python_Panel | ||||||
|
|
||||||
| This document provides comprehensive guidance for AI assistants working with the Python_Panel codebase. | ||||||
|
|
||||||
| ## Project Overview | ||||||
|
|
||||||
| **Python_Panel** is a terminal dashboard application that displays real-time weather forecasts and banking transaction summaries in a styled terminal interface. Built with Python and the Rich library, it demonstrates clean separation of concerns and modular architecture. | ||||||
|
|
||||||
| ### Key Features | ||||||
| - Real-time hourly and weekly weather forecasts via OpenWeather API | ||||||
| - Automatic location detection (WinRT on Windows, IP-based fallback) | ||||||
| - Banking overview from local CSV files with balance calculations | ||||||
| - Multiple terminal themes (forest_dark, forest, autumn, glacier, midnight_olive) | ||||||
| - Live screen refresh with configurable intervals | ||||||
|
|
||||||
| ## Project Structure | ||||||
|
|
||||||
| ``` | ||||||
| Python_Panel/ | ||||||
| ├── app/ # Main application package | ||||||
| │ ├── main.py # Entry point - orchestrates services and main loop | ||||||
| │ ├── config.py # Configuration loader with defaults | ||||||
| │ ├── paths.py # Path constants (BANK_DIR, CONFIG_DIR, LOG_DIR) | ||||||
| │ ├── weather.py # WeatherService - OpenWeather API integration | ||||||
| │ ├── banking.py # Banking class - CSV parsing and calculations | ||||||
| │ ├── location.py # LocationService - geolocation handling | ||||||
| │ └── ui/ # UI module | ||||||
| │ ├── layout.py # Rich layout builder | ||||||
| │ ├── theme.py # Theme definitions (Rich Theme objects) | ||||||
| │ └── utils.py # UI helpers (forecast limits, text clamping) | ||||||
| ├── requirements/ # Configuration directory | ||||||
| │ ├── apikey_Def.py # API key template (copy to apikey.py) | ||||||
| │ └── config.json # User configuration | ||||||
| ├── example.csv # Sample bank data for testing | ||||||
| ├── requirements.txt # Python dependencies | ||||||
| └── .github/ISSUE_TEMPLATE/ # GitHub issue templates | ||||||
| ``` | ||||||
|
|
||||||
| ## Architecture & Data Flow | ||||||
|
|
||||||
| ### Application Flow | ||||||
| 1. **Startup**: Load config → Initialize services (Banking, Weather, Location) | ||||||
| 2. **Main Loop**: Runs continuously with configurable refresh interval | ||||||
| 3. **Each Cycle**: | ||||||
| - Location service updates coordinates (WinRT or IP-based) | ||||||
| - Weather service fetches hourly/weekly forecasts | ||||||
| - Banking service parses latest CSV file | ||||||
| - UI layout is built and rendered via Rich Live | ||||||
|
|
||||||
| ### Core Services | ||||||
|
|
||||||
| | Service | File | Responsibility | | ||||||
| |---------|------|----------------| | ||||||
| | `Config` | `app/config.py` | Loads JSON config, provides defaults | | ||||||
| | `WeatherService` | `app/weather.py` | Fetches and formats weather data | | ||||||
| | `Banking` | `app/banking.py` | Parses CSV, calculates balance/spent/received | | ||||||
| | `LocationService` | `app/location.py` | Determines user location via multiple methods | | ||||||
|
|
||||||
| ## Running the Application | ||||||
|
|
||||||
| ```bash | ||||||
| # Install dependencies | ||||||
| pip install -r requirements.txt | ||||||
|
|
||||||
| # Set up API keys (copy template and fill in your keys) | ||||||
| cp requirements/apikey_Def.py requirements/apikey.py | ||||||
| # Edit requirements/apikey.py with your actual API keys | ||||||
|
|
||||||
| # Run the dashboard | ||||||
| python app/main.py | ||||||
| ``` | ||||||
|
|
||||||
| ### Required API Keys | ||||||
| Configure in `requirements/apikey.py`: | ||||||
| - `api_key_weather`: OpenWeather API key (for hourly and daily forecasts) | ||||||
| - `api_key_getcity`: IPRegistry API key (for IP-based city detection) | ||||||
| - `api_key_geo`: Geoapify API key (for geocoding city names) | ||||||
|
|
||||||
| ## Configuration | ||||||
|
|
||||||
| Configuration file: `requirements/config.json` | ||||||
|
|
||||||
| | Option | Type | Default | Description | | ||||||
| |--------|------|---------|-------------| | ||||||
| | `theme` | string | `"autumn"` | UI theme (forest_dark, forest, autumn, glacier, midnight_olive) | | ||||||
| | `refresh_minutes` | int | `10` | Data refresh interval (min 10 seconds enforced) | | ||||||
|
||||||
| | `refresh_minutes` | int | `10` | Data refresh interval (min 10 seconds enforced) | | |
| | `refresh_minutes` | int | `10` | Data refresh interval in minutes (minimum refresh interval is 10 seconds regardless of configured value) | |
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documented default value for "refresh_minutes" is 10, but the actual default in the codebase is 15 (app/config.py:30). Please update the documentation to reflect the correct default value.
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documented default value for "live_screen" is true, but the actual default in the codebase is False (app/config.py:38). Please update the documentation to reflect the correct default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documented default value for the "theme" option is "autumn", but the actual default in the codebase is "classic" (app/config.py:29). Additionally, there is no "classic" theme defined in the STYLES dictionary (app/ui/theme.py:8-191), which would cause the application to fail when using the default configuration. Consider updating the documentation to match the actual default or changing the default in config.py to "autumn".