refactor: wire web to the in-repo engine and shared data dir
- web/src/server/paths.ts resolves the repo root from its own location, loads the single repo-root .env, and defines data/web/ (watchlist, stock cache, backtest cache) and data/precomputed/. - The API spawns bridge.py at the repo root instead of ../quant. - precompute_backtest.py writes to data/precomputed/ instead of ../stock-agent/data/precomputed. - Rename the project to quant-trading (web package quant-trading-web). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -326,7 +326,7 @@ def main():
|
||||
parser = argparse.ArgumentParser(description="Pre-compute backtest results")
|
||||
parser.add_argument(
|
||||
"--output", default=None,
|
||||
help="Output directory (default: ../stock-agent/data/precomputed)",
|
||||
help="Output directory (default: data/precomputed, read by the web UI)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--years", type=int, default=10,
|
||||
@@ -335,7 +335,7 @@ def main():
|
||||
args = parser.parse_args()
|
||||
|
||||
output_dir = args.output or os.path.join(
|
||||
os.path.dirname(os.path.abspath(__file__)), "..", "stock-agent", "data", "precomputed"
|
||||
os.path.dirname(os.path.abspath(__file__)), "data", "precomputed"
|
||||
)
|
||||
os.makedirs(output_dir, exist_ok=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user