35 lines
1.5 KiB
Markdown
35 lines
1.5 KiB
Markdown
# 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.
|