T1: restructure to domain/application/infrastructure + schema version 1
- Move cashflow_model/ -> domain/ - Move engine/ -> application/ - Move cli/, sync/, ai/ -> infrastructure/ - Update all imports across codebase and tests - Add version=1 to FinancialModel.to_dict() with migration hook in from_dict - Update pyproject.toml: cf entry point and packages.find Tests: 63/63 pass.
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@ from uuid import uuid4
|
||||
|
||||
import pytest
|
||||
|
||||
from cashflow_model import (
|
||||
from domain import (
|
||||
Account,
|
||||
Asset,
|
||||
CurrencyConverter,
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
from ai.assistant import AssistantService
|
||||
from ai.prompts import ADVICE_PROMPT, ANALYZE_PROMPT
|
||||
from infrastructure.ai.assistant import AssistantService
|
||||
from infrastructure.ai.prompts import ADVICE_PROMPT, ANALYZE_PROMPT
|
||||
|
||||
|
||||
class TestAssistantService:
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
from typer.testing import CliRunner
|
||||
|
||||
from cli.main import MODEL_PATH, app
|
||||
from infrastructure.cli.main import MODEL_PATH, app
|
||||
|
||||
runner = CliRunner()
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import pytest
|
||||
|
||||
from cashflow_model import CurrencyConverter, CurrencyError, ExchangeRate
|
||||
from domain import CurrencyConverter, CurrencyError, ExchangeRate
|
||||
|
||||
|
||||
class TestExchangeRate:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from pathlib import Path
|
||||
|
||||
from cashflow_model import FinancialModel
|
||||
from sync.excel_sync import ExcelSync, SyncError
|
||||
from domain import FinancialModel
|
||||
from infrastructure.sync.excel_sync import ExcelSync, SyncError
|
||||
|
||||
|
||||
class TestExcelSync:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import pytest
|
||||
|
||||
from engine.forecast import ForecastError, ForecastService
|
||||
from application.forecast import ForecastError, ForecastService
|
||||
|
||||
|
||||
class TestForecastService:
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
from cli.i18n import Translator, get_lang, set_lang, setup_i18n, t
|
||||
from infrastructure.cli.i18n import Translator, get_lang, set_lang, setup_i18n, t
|
||||
|
||||
|
||||
class TestTranslator:
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
from pathlib import Path
|
||||
|
||||
from cashflow_model import (
|
||||
from domain import (
|
||||
Account,
|
||||
Asset,
|
||||
ExchangeRate,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from engine.scenarios import DEFAULT_SCENARIOS, ScenarioService
|
||||
from application.scenarios import DEFAULT_SCENARIOS, ScenarioService
|
||||
|
||||
|
||||
class TestScenarioService:
|
||||
|
||||
Reference in New Issue
Block a user