You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implicit country discovery selects packages lacking DATASETS or Microsimulation #681
policyengine_core.scripts.detect_country_package() (policyengine_core/scripts/__init__.py:74-100) selects the first installed policyengine* package that exports CountryTaxBenefitSystem, falling back to policyengine_core.country_template.
Two Core entry points rely on detect_country_package() without checking the additional package attributes they require:
policyengine_core/scripts/run_data.py:27-35 reads importlib.import_module(country_package).DATASETS. policyengine_us, policyengine_uk, and policyengine_nz (with Export CountryTaxBenefitSystem so the Core CLI can load the NZ model policyengine-nz#36) export CountryTaxBenefitSystem without DATASETS, so policyengine-core data datasets list without -c raises AttributeError.
policyengine_core/tools/dependency_map.py:454-475,512-520 reads package.Microsimulation in "microdata" and "both" modes. policyengine_nz has no Microsimulation, so implicit discovery selects an incompatible package for those modes.
Fix: require DATASETS when run_data.py resolves a default country package (retaining the country_template fallback), and check for Microsimulation when dependency_map.py resolves a default for "microdata" or "both".
Activity