From acbf6d6bd6d63ab0e9f7c4e119827f76e0382aac Mon Sep 17 00:00:00 2001 From: kboz Date: Sun, 19 Apr 2026 01:50:32 +0200 Subject: feat(backend): unify boot process and refactor route properties - Added scripts/haul.sh, setup_auth.py, and setup_eve_data.py for simplified SSO and CSV data bootstrapping. - Refactored `Ship` and `RouteStep` properties across route planning modules to utilize dictionaries instead of strict dataclass attributes. - Re-aligned route limits, reducing upfront capital risk values in `arbitrage.py` and updating ship metrics in `manager.py`. - Updated `.gitignore`, `.env.example`, and created AI-assistant prompt configuration. - Added comprehensive "Getting Started" guides to the README and initialized CHANGELOG.md. --- backend/src/pathfinder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backend/src/pathfinder.py') diff --git a/backend/src/pathfinder.py b/backend/src/pathfinder.py index 80e7a44..4ce2df3 100644 --- a/backend/src/pathfinder.py +++ b/backend/src/pathfinder.py @@ -3,7 +3,7 @@ from dataclasses import dataclass from tqdm import tqdm from arbitrage import Trade -from graph import Graph +from graph import NavigationGraph as Graph logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) @@ -111,7 +111,7 @@ def calculate_net_profit(order_matches: list[Trade], graph: Graph, ship: Ship) - for order_match in tqdm(order_matches): try: # Calculate transport cost from ship location to from_station - cost_to_source = graph.shortest_path_length(ship.location, order_match.from_station) + cost_to_source = graph.shortest_path_length(ship["location"], order_match.from_station) # Calculate transport cost from from_station to to_station cost_to_destination = graph.shortest_path_length(order_match.from_station, order_match.to_station) -- cgit v1.3