Files
talia_bot/test_calendar_debug.py
google-labs-jules[bot] da790b8afc refactor: Overhaul project structure and role management
This commit implements the first phase of the new architectural vision for the Talia Bot.

Key changes include:
- Renamed the main application directory from `app` to `talia_bot` and updated all associated imports and configurations (`Dockerfile`, tests).
- Replaced the static, `.env`-based permission system with a dynamic, database-driven role management system.
- Introduced a `db.py` module to manage a SQLite database (`users.db`) for user persistence.
- Updated `identity.py` to fetch roles ('admin', 'crew', 'client') from the database.
- Rewrote the `README.md` and `.env.example` to align with the new project specification.
- Refactored the LLM module into the new `modules` structure.
2025-12-20 20:33:59 +00:00

28 lines
913 B
Python

import datetime
import sys
import os
# Add app directory to path
sys.path.append(os.path.join(os.getcwd(), 'talia_bot'))
from modules.calendar import get_events
from config import CALENDAR_ID
def test_get_events():
print(f"Testing with CALENDAR_ID: {CALENDAR_ID}")
now = datetime.datetime.now(datetime.timezone.utc)
start_of_day = now.replace(hour=0, minute=0, second=0, microsecond=0)
end_of_day = start_of_day + datetime.timedelta(days=1)
print(f"Fetching events from {start_of_day.isoformat()} to {end_of_day.isoformat()}...")
try:
events = get_events(start_of_day, end_of_day)
print(f"Found {len(events)} events.")
for event in events:
print(f"- {event.get('summary')} at {event['start'].get('dateTime', event['start'].get('date'))}")
except Exception as e:
print(f"Error: {e}")
if __name__ == "__main__":
test_get_events()