refactor(layout): rename multi_swarm → multi_swarm_core con doppia nidificazione uv workspace

- mv src/multi_swarm → src/multi_swarm_core/multi_swarm_core (member layout)
- sed-replace globale degli import: from/import multi_swarm.* → multi_swarm_core.*
- 115 occorrenze aggiornate in src/ scripts/ tests/
- multi_swarm_coevolutive (nome repo) preservato dal word boundary

Pre-condizione per il setup uv workspace della Fase 3.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Adriano Dal Pastro
2026-05-15 17:43:48 +00:00
parent 7d766173a4
commit b6539802e0
103 changed files with 746 additions and 110 deletions
+18 -18
View File
@@ -4,14 +4,14 @@ import numpy as np
import pandas as pd
import pytest
from multi_swarm.agents.adversarial import (
from multi_swarm_core.agents.adversarial import (
AdversarialAgent,
AdversarialReport,
Severity,
)
from multi_swarm.backtest.engine import BacktestResult
from multi_swarm.backtest.orders import Side, Trade
from multi_swarm.protocol.parser import parse_strategy
from multi_swarm_core.backtest.engine import BacktestResult
from multi_swarm_core.backtest.orders import Side, Trade
from multi_swarm_core.protocol.parser import parse_strategy
@pytest.fixture
@@ -178,10 +178,10 @@ def test_undertrading_under_10_is_high(monkeypatch: pytest.MonkeyPatch,
return lambda df: fake_signals
monkeypatch.setattr(
"multi_swarm.agents.adversarial.BacktestEngine.run", fake_run
"multi_swarm_core.agents.adversarial.BacktestEngine.run", fake_run
)
monkeypatch.setattr(
"multi_swarm.agents.adversarial.compile_strategy", fake_compile
"multi_swarm_core.agents.adversarial.compile_strategy", fake_compile
)
src = _MINIMAL_STRATEGY_SRC
@@ -220,8 +220,8 @@ def test_undertrading_threshold_parametric(monkeypatch: pytest.MonkeyPatch,
def fake_compile(strategy): # type: ignore[no-untyped-def]
return lambda df: fake_signals
monkeypatch.setattr("multi_swarm.agents.adversarial.BacktestEngine.run", fake_run)
monkeypatch.setattr("multi_swarm.agents.adversarial.compile_strategy", fake_compile)
monkeypatch.setattr("multi_swarm_core.agents.adversarial.BacktestEngine.run", fake_run)
monkeypatch.setattr("multi_swarm_core.agents.adversarial.compile_strategy", fake_compile)
ast = parse_strategy(_MINIMAL_STRATEGY_SRC)
# Default threshold 10: 15 trade NON killato
@@ -269,10 +269,10 @@ def test_overtrading_with_tighter_threshold(monkeypatch: pytest.MonkeyPatch,
return lambda df: fake_signals
monkeypatch.setattr(
"multi_swarm.agents.adversarial.BacktestEngine.run", fake_run
"multi_swarm_core.agents.adversarial.BacktestEngine.run", fake_run
)
monkeypatch.setattr(
"multi_swarm.agents.adversarial.compile_strategy", fake_compile
"multi_swarm_core.agents.adversarial.compile_strategy", fake_compile
)
src = _MINIMAL_STRATEGY_SRC
@@ -315,10 +315,10 @@ def test_flat_too_long_flagged(monkeypatch: pytest.MonkeyPatch,
return lambda df: fake_signals
monkeypatch.setattr(
"multi_swarm.agents.adversarial.BacktestEngine.run", fake_run
"multi_swarm_core.agents.adversarial.BacktestEngine.run", fake_run
)
monkeypatch.setattr(
"multi_swarm.agents.adversarial.compile_strategy", fake_compile
"multi_swarm_core.agents.adversarial.compile_strategy", fake_compile
)
src = _MINIMAL_STRATEGY_SRC
@@ -367,10 +367,10 @@ def test_fees_eat_alpha_flagged(monkeypatch: pytest.MonkeyPatch,
return lambda df: fake_signals
monkeypatch.setattr(
"multi_swarm.agents.adversarial.BacktestEngine.run", fake_run
"multi_swarm_core.agents.adversarial.BacktestEngine.run", fake_run
)
monkeypatch.setattr(
"multi_swarm.agents.adversarial.compile_strategy", fake_compile
"multi_swarm_core.agents.adversarial.compile_strategy", fake_compile
)
src = _MINIMAL_STRATEGY_SRC
@@ -413,10 +413,10 @@ def test_time_in_market_too_high_flagged(monkeypatch: pytest.MonkeyPatch,
return lambda df: fake_signals
monkeypatch.setattr(
"multi_swarm.agents.adversarial.BacktestEngine.run", fake_run
"multi_swarm_core.agents.adversarial.BacktestEngine.run", fake_run
)
monkeypatch.setattr(
"multi_swarm.agents.adversarial.compile_strategy", fake_compile
"multi_swarm_core.agents.adversarial.compile_strategy", fake_compile
)
src = _MINIMAL_STRATEGY_SRC
@@ -461,10 +461,10 @@ def test_reasonable_balanced_strategy_not_flagged(monkeypatch: pytest.MonkeyPatc
return lambda df: fake_signals
monkeypatch.setattr(
"multi_swarm.agents.adversarial.BacktestEngine.run", fake_run
"multi_swarm_core.agents.adversarial.BacktestEngine.run", fake_run
)
monkeypatch.setattr(
"multi_swarm.agents.adversarial.compile_strategy", fake_compile
"multi_swarm_core.agents.adversarial.compile_strategy", fake_compile
)
src = _MINIMAL_STRATEGY_SRC