Run ruff format changes and finalize indentation and lint fixes.

This commit is contained in:
William Valentin
2025-08-09 12:10:16 -07:00
parent 9cec07e9f6
commit 9a5a2f0022
68 changed files with 1272 additions and 4301 deletions

34
MIGRATION.md Normal file
View File

@@ -0,0 +1,34 @@
# Migration Guide: Canonical Imports and Running TheChart
This project now uses the canonical package `thechart.*` for all imports.
What changed
- Legacy shim modules under `src/` (e.g., `src/ui_manager.py`) remain only for compatibility and now emit `DeprecationWarning`.
- Canonical modules live under `src/thechart/` and should be imported directly.
Do this
- Imports:
- from thechart.ui import UIManager, ThemeManager
- from thechart.analytics import GraphManager
- from thechart.data import DataManager
- from thechart.export import ExportManager
- from thechart.managers import MedicineManager, PathologyManager
- from thechart.search.search_filter import DataFilter, QuickFilters, SearchHistory
- from thechart.core.logger import init_logger
- from thechart.core.constants import LOG_LEVEL, LOG_PATH, LOG_CLEAR, BACKUP_PATH
- from thechart.core.auto_save import AutoSaveManager, BackupManager
- from thechart.core.error_handler import ErrorHandler, OperationTimer, handle_exceptions
- from thechart.core.preferences import get_pref, set_pref, load_preferences, save_preferences, reset_preferences
- from thechart.core.undo_manager import UndoManager, UndoAction
- from thechart.validation import InputValidator
- Run the app:
- python -m thechart
Avoid this
- from src.ui_manager import UIManager (deprecated)
- from ui_manager import UIManager (deprecated)
Notes
- Deprecation shims will be removed once all usages are migrated.
- Tests will be updated separately to import from `thechart.*` directly.