Polish project documentation and runtime config

This commit is contained in:
2026-06-09 10:22:59 +08:00
parent 5f061295d8
commit 0594fc9f8c
43 changed files with 1001 additions and 97 deletions

View File

@@ -21,10 +21,12 @@ from typing import Any
import requests
import urllib3
from common_paths import GAODE_CRAWLER_PATH, PROJECT_ROOT, TRAVEL_KG_EXPORT_ROOT
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
BUILD_SCRIPT = Path("/Users/xuexue/new2/scripts/build_travel_graph_existing_product_project.py")
OUT_DIR = Path("/Users/xuexue/Downloads/图谱数据/travel_graph_旅行社线路制定")
BUILD_SCRIPT = PROJECT_ROOT / "scripts/build_travel_graph_existing_product_project.py"
OUT_DIR = TRAVEL_KG_EXPORT_ROOT / "travel_graph_旅行社线路制定"
NODES_PATH = OUT_DIR / "抽取结果_nodes.json"
CACHE_PATH = OUT_DIR / "amap_poi_enrichment_cache.json"
REPORT_CSV = OUT_DIR / "amap_poi_enrichment_report.csv"
@@ -47,7 +49,7 @@ def load_key() -> str:
for key in (os.environ.get("AMAP_WEB_KEY"), os.environ.get("AMAP_KEY")):
if key:
return key
crawl_path = Path("/Users/xuexue/PycharmProjects/PythonProject/xuexue-CityGraph/crawl_guiyan.py")
crawl_path = GAODE_CRAWLER_PATH
if crawl_path.exists():
spec = importlib.util.spec_from_file_location("crawl_guiyan", crawl_path)
mod = importlib.util.module_from_spec(spec)