Fix path references in scripts after reorganization
Update 8 scripts to use Path(__file__).parent.parent as PROJECT_ROOT so they resolve data/, output/, and internet_cables/ relative to the project root rather than the caller's working directory. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,13 +3,15 @@ import argparse
|
||||
import csv
|
||||
import os
|
||||
from decimal import Decimal
|
||||
from pathlib import Path
|
||||
|
||||
import psycopg2
|
||||
from psycopg2.extras import execute_values
|
||||
|
||||
|
||||
CSV_PATH = "US_DC_Sample_geocoded.csv"
|
||||
IM3_CSV_PATH = "new/IM3_Existing_DataCenters.csv"
|
||||
PROJECT_ROOT = Path(__file__).parent.parent
|
||||
CSV_PATH = str(PROJECT_ROOT / "data" / "US_DC_Sample_geocoded.csv")
|
||||
IM3_CSV_PATH = str(PROJECT_ROOT / "new" / "IM3_Existing_DataCenters.csv")
|
||||
TABLE = "public.us_dc_sample_geocoded"
|
||||
DB_NAME = "data_centers"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user