""" economy_import — module package behind tooling/economy-db/import_economics.py. Split out of the former single-file importer (T-1067). The entrypoint ``import_economics.py`` remains the CLI (Makefile regen-db, make test-tooling) and orchestrates the single-transaction import; the steps live here: paths.py source-file path constants (re-exports stamped paths from tooling/generator_sources.py) errors.py ImportAborted control-flow exception db.py connection + FK-safe table-clear helpers migration.py MIGRATION_SQL / COLUMN_MIGRATIONS schema migration economy.py gate links, commodities, chains, currency zones, gate energy, system_fiscal corporations.py wiki corp parsing, D-182 sync, corp_presence brands.py generate_brands shell-out + D-189 brand layer bodies.py body_radius_km / axial_tilt_deg backfills atlas.py atlas index schema + city-name pool (D-223, D-207) specialization.py D-237 authored specialization layer traits.py D-232 architecture-flavor trait templates + hero bias validators.py structural + D-175 coverage validation stamp.py meta-table generator stamp (#855, #856) Every module here is part of the import_economics meta-stamp source set — tooling/generator_sources.py globs this directory, so adding a module automatically extends staleness detection. """ import sys from pathlib import Path # Bootstrap: make tooling/ importable (generator_sources, schema_version) # before any submodule needs them. tooling/economy-db is not a package # (hyphenated dir), so the entrypoint puts it on sys.path and this package # adds tooling/ itself. _TOOLING_DIR = Path(__file__).resolve().parents[2] if str(_TOOLING_DIR) not in sys.path: sys.path.insert(0, str(_TOOLING_DIR))