Note: these are poroject specific and were generated by running the CHAT: Generate Workplace Instructions file from the command pallet.
Flask-based time tracking application with Bootstrap frontend, SQLite database, and Docker containerization.
Uses Blueprint architecture with three main modules: home (entry management), reports (analytics), and admin (settings).
- Flask application factory in
app/app.pywith Blueprint registration - Time storage format: Mixed handling of both integer minutes-past-midnight and "HH:MM" strings (see
parse_time_to_minutes()in reports.py) - Database models: SQLAlchemy with explicit
__init__methods for type hinting (seeapp/models.py) - Template structure: Base template with Bootstrap 5, header/footer includes, flash message handling
- Package management:
uvfor dependencies, PowerShell for commands - Testing: pytest with arrange/act/assert pattern,
$env:PYTHONPATH='S:\TimeTracker'; pytestto run - Database: SQLite with Docker volume mounting to
/app/data - CSS/JS: Inline in templates, sortable tables with time format conversion
# Always use parse_time_to_minutes() for mixed format support
def parse_time_to_minutes(value):
# Handles both 480 (int) and "8:00" (str) formats- Use
with app.app_context():for database operations in tests - Import models locally in test functions to avoid circular imports
- Direct route paths (
"/reports/weekly") instead ofurl_for()to avoid Flask context issues
- PEP 8 naming, type annotations for functions/variables
- Sorted imports per ruff style
- Minimal docstrings for files, functions, classes
- No logging unless specifically requested
|syntax for optional model fields
VSCode can have a file that is prepended to any GitHub copilot - https://www.youtube.com/watch?v=y_dfDUuaQD4 I've been experimenting with it, and this is my set of instructions. In a gist you enable the setting in workplace settings (github.copilot.chat.experimental.codeGeneration.instructions) and then tell it your settings are in a file (I use .vscode/copilot-instructions.md) and it will use them when using GitHub-Copilot Chat!
To activate add the following to the
workplace settings