Sari la conținut

TODOs and Roadmap

Phase 1: Project Setup

  • [x] Initialize Python project with virtual environment
  • [x] Install dependencies: google-api-python-client, pyyaml, argparse, cryptography, etc.
  • [x] Set up project directory structure as per tech-details.md
  • [x] Set up basic logging and error handling framework

Phase 2: Core Infrastructure

  • [x] Implement CLI interface (main.py) using pyt_utils.cli_utils.CLI.build_from_class(MainApp) for Fire-based commands (--config, --verbose, --dry-run, --service options)
  • [x] Implement config functions: load_config, resolve_email_pools, get_criteria
  • [x] Implement email_pools resolution and criteria parsing
  • [x] Set up OAuth2 authentication functions for Google APIs
  • [x] Implement API functions: authenticate, fetch_items, delete_item

Phase 3: API Functions

  • [x] Implement Gmail functions for fetching emails, applying filters (subject, body, attachments)
  • [ ] Implement Drive functions for Google Drive files
  • [ ] Implement Photos functions for Google Photos (if applicable)
  • [ ] Add pagination and batching for large datasets
  • [ ] Implement rate limiting and retry logic for API calls

Phase 4: Triage and Categorization

  • [x] Implement triage functions: triage_items, evaluate_item for progressive criteria evaluation
  • [x] Implement category assignment: sensitive, savable, redundant, etc.
  • [x] Add support for Gmail-specific criteria: sender pools, attachment types/sizes
  • [x] Add support for Gmail folders (labels) in criteria and actions
  • [ ] Extend criteria for Drive/Photos: file types, metadata, labels
  • [ ] Test triage logic with sample data

Phase 5: Backup System

  • [x] Implement backup functions: create_backup, store_backup, verify_backup for hashable backups (SHA-256)
  • [x] Set up backup storage structure (backups/ directory)
  • [x] Add incremental backup support (check existing hashes)
  • [x] Implement backup verification and integrity checks
  • [x] Add encryption for backups (optional AES)

Phase 6: Action Execution

  • [x] Implement action functions: execute_actions, track_progress for performing actions: ignore, backup_only, backup_and_delete, delete_only
  • [x] Implement progress tracking and real-time updates
  • [x] Add confirmation prompts for destructive actions
  • [x] Handle interrupt points for manual intervention
  • [x] Integrate backup functions for pre-delete backups

Phase 7: Integration and Testing

  • [x] Integrate all modules into main application flow
  • [x] Implement dry-run mode for simulation
  • [ ] Add comprehensive unit tests for each module
  • [ ] Create integration tests for end-to-end flows
  • [ ] Test with real Google API (sandbox/dev account)

Phase 8: Safety and Reliability

  • [ ] Implement rollback mechanism for failed operations
  • [ ] Add data validation for YAML to prevent malicious configs
  • [ ] Enhance error handling with custom exceptions
  • [ ] Set up structured logging with file output and rotation
  • [ ] Add monitoring and alerting for issues

Phase 9: Automation and Cron Support

  • [ ] Ensure CLI is cronjob-friendly with minimal output in automated mode
  • [ ] Add checkpoint/resume functionality for long-running processes
  • [ ] Implement summary reports and email notifications
  • [ ] Test automation scenarios with sample cron jobs

Phase 10: Documentation and Finalization

  • [ ] Update README.md with installation and usage instructions
  • [ ] Create user guide for YAML configuration
  • [ ] Add inline code documentation and docstrings
  • [ ] Perform final testing and bug fixes
  • [ ] Prepare release package and deployment scripts

Phase 11: Future UI (Optional)

  • [ ] Set up Streamlit framework
  • [ ] Implement dashboard for storage usage and progress
  • [ ] Add data display and triage visualization
  • [ ] Integrate with CLI for hybrid operation
  • [ ] Test UI components and user flows

Phase 12: Maintenance and Extensions

  • [ ] Monitor for Google API changes and update clients
  • [ ] Add support for additional criteria or services
  • [ ] Implement performance optimizations
  • [ ] Gather user feedback and iterate on features