Skip to content

Commit 74f59dd

Browse files
committed
Make ZIP code export lazy
- Stop importing policyengine_us_data.geography at package import time. - Expose ZIP_CODE_DATASET through a lazy __getattr__ export instead, so importing policyengine_us_data no longer forces pandas to load. - This breaks the modal deploy import chain that was failing in modal_app.pipeline -> modal_app.local_area -> policyengine_us_data.__init__ on the CI runner.
1 parent 4bbd4da commit 74f59dd

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

policyengine_us_data/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
from importlib import import_module
22

3-
from .geography import ZIP_CODE_DATASET
4-
53
_LAZY_EXPORTS = {
4+
"ZIP_CODE_DATASET": (
5+
"policyengine_us_data.geography",
6+
"ZIP_CODE_DATASET",
7+
),
68
"CPS_2024": (
79
"policyengine_us_data.datasets.cps.cps",
810
"CPS_2024",

0 commit comments

Comments
 (0)