A desktop application for managing and processing CANOE energy model databases and configurations.
The app provides a simple graphical interface (built with Flet) to select model inputs, manage SQL schemas, and process datasets for the CANOE energy systems model.
Please check the release section for an executable file of the interface, downloading them means you don't need to clone the repositorys
- Cross-platform UI: built with Flet (runs as a Python script or compiled Windows executable).
- Automatic logging: every session writes a timestamped log file for debugging and tracking.
- Platform-aware directories: logs, config, and assets are stored in appropriate locations for Python and compiled builds.
- Database schema support: automatically loads a bundled
schema.sqlfile used for SQLite setup. - Config persistence: saves UI options and state to a JSON configuration file.
.
├── main.py # Entry point for the Flet application
├── database_processing.py # Database processing utilities
├── directories.py # Manages platform-specific paths
├── log_setup.py # Global logging configuration
├── constants.py # Shared enums and constants
├── requirements.txt # Python dependencies
├── assets/
│ └── schema.sql # SQL schema used by the database
├── logs/ # Log output (created automatically)
├── input/
│ └── config.json # Saved UI configuration
# Create an empty environment (no dependencies yet)
python -m venv .venv
# Activate it
# Windows:
.venv\Scripts\activate
# macOS/Linux:
source .venv/bin/activatepip install -r requirements.txtOnce dependencies are installed, launch the app with:
python main.pyLogs will be written to:
./logs/
Configuration files will be created in:
./input/config.json
When the window opens:
- Select model directories or inputs — depending on the UI options available in your version of the interface.
- Select region-sector-scenario configurations — determines the resolution of the output CANOE model.
- Click submit to process — The input dataset will be processed into the output database
- View logs in the terminal or in the
logs/folder.
If you’re running a compiled executable, logs and config are stored in your user directories (via platformdirs):
C:\Users\<you>\AppData\Local\CANOE\RSSSelector\Logs
C:\Users\<you>\AppData\Local\CANOE\RSSSelector\Config
You can build a standalone Windows executable using PyInstaller.
pip install pyinstallerpyinstaller CANOE.specOnce built, your app will appear in the dist/ folder:
dist/
└── main.exe
When you run the EXE:
platformdirsensures logs and configs are written under your user’s app data folder.- Bundled resources (like
schema.sql) are available throughdirectories.get_resource_path().
Every run of the app generates a timestamped rotating log file, such as:
logs/canoe_app_2025-11-10_15-30-42.log
Logs include timestamps, log levels, and message origins. When running as a compiled EXE, logs are written under:
%LOCALAPPDATA%\CANOE\RSSSelector\Logs
Common definitions for regions, sectors, and model parameters are located in constants.py.
This includes:
- Enumerations for model regions, sectors, and variants.
- UI scenario defaults.
- Table lists and default parameter values for CANOE datasets.